Home >
Back-end > C wrote in the main function to create multithreaded statement after unable to enter the main functi
C wrote in the main function to create multithreaded statement after unable to enter the main functi
#include
#include
using namespace std;
Void fun1 ()
{
cout <& lt; "Hello" & lt; }
Int main ()
{
Fun1 ();
Thread t (fun1);
T.j oin ();
return 0;
}
No error, the debug flash back, look for a long time really don't know how to solve, bosses, come on for advice CodePudding user response:
I written in the VScode, the compiler is mingw - posix CodePudding user response:
A compiler can?
Isn't it a little bit of c + + 11 compiler options, try to check CodePudding user response: