Object Creation in thread function
How can I create an Object inside a thread function?....I'm trying to create a new thread that handles a small webserver. The thread fucntion doesn't seem to create the webserver object though. The webserver class itself works fine, but once I try to put it in a seperate thread nothing seems to work.
Heres how I am starting the new thread
Calling beginthread in another class as follows
UINT StartWebServer(LPVOID param)
webServer = new WebServer(HTTPPORT);
AfxBeginThread(&StartWebServer, NULL, THREAD_PRIORITY_NORMAL, 0, 0, NULL);
why does this not work? how can I fix it