@ -5,6 +5,7 @@ vim hellothread.cpp //按i进行修改操作 按esc退出修改操作 若要
g++ -pthread hellothread.cpp -o daling_123.out //-o 重命名否则默认为a.out -pthread引入函数库文件
./daling_123.out //执行.out可执行文件
(若是无限循环,使用Ctrl+C退出);
(若要 创建文件 切换到指定目录后 touch 文件名);
实验1.2
#include <stdio.h>
#include <stdlib.h>//for exit()