Linux C如何编写C11标准的代码,以及c11并行计算所用的头文件

Linux C编译C11标准的代码

gcc -std=c11 thread.c

如果分开编译,参考上一篇文章。

C++编译C++11标准的代码和C11一其中C语言多行程用的头文件是#include <pthread.h> C++用的是#include<thread>本次试验在Ubuntu16中测试。其中C++的并发Linux和windows差别不大,C语言的头文件有出入。Windows的头文件引用#include <thr/xthreads.h>

不管是Linux的gcc还是Windows的VS2017头文件都不是#include<threads.h>

猜你喜欢

转载自blog.csdn.net/m0_38036750/article/details/82663644
C11