Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

threading

Status
Not open for further replies.

eemah

Programmer
Jul 1, 2002
4
0
0
GB
How can I run a class member method in a thread, in a win32 console application. I have been trying with _beginthread but I got the error
C:\My Documents\Alberto\Copy of Project_5_5_02\avd_server\avd_server2.cpp(51) : 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

Thanks,
Alberto H.
 
add the __cdecl at the beginning of the function declaration. This is a name mangling problem. Also, extern "C"
{
function
}

should do it as well.

Matt
 
I'm working on a video client/server application and I would
like to know what kind of sockets would be more appropriate for it and why: csocket, casyncsocket, socket, ...

Thanks,
Alberto H.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top