Archived

This topic is now archived and is closed to further replies.

Threads and Classes

This topic is 5893 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I''m having a bit of trouble with this one. When a member function of my class is called, the function''s only job is to create a thread. The the function I specify in CreateThread is a member function of the same class, but it wont work. I get this error: Info :Making... Info :Compiling C:\BC5\BIN\BGP\bgp.cpp Error: bgp.cpp(903,58):Member function must be called or its address taken Now the only code that produces this error is as follows: bool BGP::RunThread() { CreateThread( NULL, 0, (LPTHREAD_START_ROUTINE)MyThread, (LPVOID) hWnd, 0, &Tid1); return true; } DWORD BGP::MyThread() { return 0; } What have I done wrong?

Share this post


Link to post
Share on other sites