今天使用VC学习多线程遇到的问题,加人头文件#include<process.h>后编译报错error C2065: '_beginthread' : undeclared identifier,大概就是VC编译程序时工程设置的单线程,只要改一下工程中的设置就好了,步骤如下:
Project->Settings->C/C++->Code Generation->Use run-time libray->Debug Multithread,或 Multithread,或 Debug Multithread DLL, 或 Multithread DLL都可以,即Use run-time library需要使用多线程的。