error C2065: ‘_beginthread‘ : undeclared identifier

error C2065: ‘_ beginthread’ : undeclared identifier

First, include & lt; process.h> Header file. If an error is reported, set the engineering parameters as follows:
Project – & gt; Select the C/C + + page in settings… And then select code generation in category, and then select multithreaded (or multithreader DLL or debug multithreader DLL or debug multithreader) in use runtime library below it

If you still report an error, put the following two sentences at the beginning of the cpp file
extern “C” unsigned long __ cdecl _ beginthread (void (__ cdecl *) (void *),
unsigned, void *);
extern “C” void __ cdecl _ endthread(void);

The test is effective
this is equivalent to manually declaring the two functions.

Read More: