摘要:
#include #include #include #include sem_t sem1,sem2; void func1(char * string){ int i = 0; while(i<100){ sem_wait(&sem1); printf("%s\n",string); i++; ... 阅读全文
posted @ 2016-04-18 23:33
wzb的QQ空间
阅读(714)
评论(0)
推荐(0)
摘要:
#include #include void func(char* string){ printf("%s\n",string); } int main(){ pthread_t pid; pthread_create(&pid,NULL,(void*)func,"Hello World!"); pthread_join(pi... 阅读全文
posted @ 2016-04-18 22:15
wzb的QQ空间
阅读(246)
评论(0)
推荐(0)
摘要:
新建C文件,新建一个文件用touch,新建文件夹用mkdir。 打开文本编辑器,编辑C文件,命令用gedit xxx.C 编写C程序,Ctrl+S保存 编译运行 1、gcc命令是编译 -o是可选项 是对生成的文件命名。 2、gcc编译过后就能看见多出了一个hello.out文件, 如果不用-o,就默 阅读全文
posted @ 2016-04-18 21:55
wzb的QQ空间
阅读(1661)
评论(0)
推荐(0)

浙公网安备 33010602011771号