[SDL] Thread problem; function call missing argument list

Edward Byard e_byard at yahoo.co.uk
Sun Apr 15 15:02:01 PDT 2007


Thanks - you were right - couldn't see the wood for trees :-)

----- Original Message ----
From: Daniel K. O. <danielko.listas at gmail.com>
To: A list for developers using the SDL library. (includes SDL-announce) <sdl at lists.libsdl.org>
Sent: Sunday, 15 April, 2007 10:32:43 PM
Subject: Re: [SDL] Thread problem; function call missing argument list

Edward Byard escreveu:
> MyClass::MyClass(void) // constructor
> {
>     myThread= SDL_CreateThread(myThreadFunction,NULL);
> }
>
>
> int MyClass::myThreadFunction(void *data)
> {
>     return 0;
> }
>   

SDL_CreateThread takes a pointer to a function. So myThreadFunction
needs to be a "class function" (aka static method) or plain function.
You didn't post the class declaration, but if I were to guess,
myThreadFunction was declared as a plain method, not as a static method.

---
Daniel K. O.

_______________________________________________
SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org







      ___________________________________________________________ 
Yahoo! Mail is the world's favourite email. Don't settle for less, sign up for
your free account today http://uk.rd.yahoo.com/evt=44106/*http://uk.docs.yahoo.com/mail/winter07.html 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20070415/c09e2ccb/attachment-0001.htm 


More information about the SDL mailing list