DoubleLi

qq: 517712484 wx: ldbgliet

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::

2021年11月16日

摘要: 1、system(执行shell 命令)相关函数:fork,execve,waitpid,popen表头文件:#include<stdlib.h>函数原型:int system(const char * string);函数说明 :system()会调用fork()产生子进程,由子进程来调用/bin 阅读全文
posted @ 2021-11-16 17:07 DoubleLi 阅读(1047) 评论(0) 推荐(0)

摘要: 在linux系统下,用C++程序执行shell命令有多种方式 管道方式 #include <iostream>#include <unistd.h>#include <sys/types.h> int main(){ FILE *pp = popen("cd /xxxx && ls -l", "r" 阅读全文
posted @ 2021-11-16 17:06 DoubleLi 阅读(1626) 评论(0) 推荐(0)

摘要: Map是STL的一个关联容器,它提供一对一(其中第一个可以称为关键字,每个关键字只能在map中出现一次,第二个可能称为该关键字的值)的数据 处理能力,由于这个特性,它完成有可能在我们处理一对一数据的时候,在编程上提供快速通道。这里说下map内部数据的组织,map内部自建一颗红黑树(一 种非严格意义上 阅读全文
posted @ 2021-11-16 15:31 DoubleLi 阅读(141) 评论(0) 推荐(0)

摘要: 1. append函数 常用的函数原型: basic_string &append( const basic_string &str ); basic_string &append( const char *str ); basic_string &append( const basic_strin 阅读全文
posted @ 2021-11-16 15:13 DoubleLi 阅读(1118) 评论(0) 推荐(0)