I would like to perform the operation stated above.
void myFunc()
{
... // several stuff
}
...
int main()
{
...
// I would like to run myFunc in a thread so that the code below could execute
// while it is being completed.
...
}
What do you suggest I should do? Which function call from which library would enable me to complete my goal?
For Win32 programming, you can use
beginthread. There is alsoCreateThread, but if I remember correctly, that doesn’t initialize the C/C++ environment, which leads to problems.Edit: Just checked – MSDN states “A thread in an executable that calls the C run-time library (CRT) should use the _beginthread and _endthread functions for thread management rather than CreateThread and ExitThread”.