Multithread - Compile error - might be an easy one
Posted on 2005-03-15
I'm trying to use multithread on my program. But when I use _beginthread(MyFunction(),0,0); i get a compile error:
error C2664: '_beginthread' : cannot convert parameter 1 from 'void (void)' to 'void (__cdecl *)(void *)' None of the functions with this name in scope match the target type
I searched internet and I found out that i should use static functions or/and use specific cast but no matters what I do, i still getting that compile error. I'm using vc++6 and I have the lib linked the #include <process.h> and I'm using multithread libs.
What is funny is that I can run the demo that comes with MSDN without any problem. Maybe the problem is that I'm using windows API. Please don't tell me to use MFC. Or a config of the project. I used an empty windows project for that one that gives me the error and a default project for that one that doesn't.