[SDL] Thread problem; function call missing argument list

Edward Byard e_byard at yahoo.co.uk
Sun Apr 15 12:43:38 PDT 2007


Hi

I'm using threads for the first time, and I have a class (singleton) where I am setting up a thread:

SDL_Thread *myThread = NULL; // global


MyClass::MyClass(void) // constructor
{
    myThread= SDL_CreateThread(myThreadFunction,NULL);
}


int MyClass::myThreadFunction(void *data)
{
    return 0;
}

When I compile, I keep getting:

error C3867: 'MyClass::myThreadFunction': function call missing argument list; use '&MyClass::myThreadFunction' to create a pointer to member

But this shouldn't be occuring....what's going on?! It looks so simple in the examples...

Thanks in advance!
Ed




      ___________________________________________________________
Yahoo! Answers - Got a question? Someone out there knows the answer. Try it
now.
http://uk.answers.yahoo.com/ 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20070415/5d811de9/attachment.htm 


More information about the SDL mailing list