Useing threads with class

hello again friends:

well now I have a problem with threads, the point is that I have a class that
handles a thread, and when I send to the function SDL_Thread
*SDL_CreateThread(int (*fn)(void *), void *data); his first argument that is the
funtion that I want as a threads I get an error message, telling me this

error: argument of type ‘int (Cpacman::)(void*)’ does not match ‘int ()(void)’

I understand what means that message, but i don’t know how to made the
conversion, because the funtion that I’m sending is a class method and
SDL_CreateThread need a function, not a method of a class, I don’t know if I
make myself clear.

but if anyone knows what I mean, please tell me how to solve this problem.

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

I think this is precisely the problem we’ve just solved?

:-S

Cheers,

Andre

--------- Mensagem Original --------De: SDL Development List
Para: SDL Development List
Assunto: [SDL] useing threads with class
Data: 28/10/09 17:53

hello again friends:

well now I have a problem with threads, the point is that I have a class
that
handles a thread, and when I send to the function SDL_Thread
*SDL_CreateThread(int (*fn)(void *), void *data); his first argument that
is the
funtion that I want as a threads I get an error message, telling me this

error: argument of type ‘int (Cpacman::)(void*)’ does not match ‘int
()(void)’

I understand what means that message, but i don’t know how to made the
conversion, because the funtion that I’m sending is a class method and
SDL_CreateThread need a function, not a method of a class, I don’t know if
I
make myself clear.

but if anyone knows what I mean, please tell me how to solve this problem.

greetings.


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


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


Mensagem enviada pelo Microlink Webmail 12.7.8p3