摘要: #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;} 阅读全文
posted @ 2013-11-19 13:50 永久指针 阅读(222) 评论(0) 推荐(0) 编辑
摘要: 如果在Linux Terminal 里面 man system 大家可以看到system()函数的用法,非常简单:函数声明如下:int system(const char *command); 函数失败则返回-1,成功后返回0。 例:system("echo hello > hello.txt") /*将hello 写入到hello.txt*/ 阅读全文
posted @ 2013-11-19 13:42 永久指针 阅读(1676) 评论(0) 推荐(0) 编辑