![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
c
susu09new
这个作者很懒,什么都没留下…
展开
-
C语言getopt()函数的使用
getopt(分析命令行参数) 相关函数表头文件 #include 定义函数 int getopt(int argc,char * const argv[ ],const char * optstring); 函数说明 getopt()用来分析命令行参数。参数argc和argv是由main()传递的参数个数和内容。参数opt转载 2013-10-15 17:10:05 · 513 阅读 · 0 评论 -
pthread_join(等待另一个线程结束)
pthread_join使一个线程等待另一个线程结束。 代码中如果没有pthread_join主线程会很快结束从而使整个进程结束,从而使创建的线程没有机会开始执行就结束了。加入pthread_join后,主线程会一直等待直到等待的线程结束自己才结束,使创建的线程有机会执行。 所有线程都有一个线程号,也就是Thread ID。其类型为pthread_t。通过调用pthread_self(转载 2013-09-06 20:28:16 · 1932 阅读 · 0 评论