摘要:
#include #include #include #include #include int main(int argc, char** argv){ if(argc<2) { printf("error usage!\n"); exit(1); } int a = atoi(argv[1]); printf("you've input %s\n, after atoi...",argv[1]); printf("you get %d\n",a); return 0;} 阅读全文
摘要:
如果在Linux Terminal 里面 man system 大家可以看到system()函数的用法,非常简单:函数声明如下:int system(const char *command); 函数失败则返回-1,成功后返回0。 例:system("echo hello > hello.txt") /*将hello 写入到hello.txt*/ 阅读全文