Create Thread inside class/namespace(Ron Penton ThreadLib)

Dec 12, 2012 at 6:21pm
Hi, I am using the ThreadLib library from Ron Pentons MUD Programming. I am having trouble creating a thread within a class.
Error is: Argument of type (Foo::bar::*)(void* data) is incompatible with paramater of type ThreadLib::ThreadFunc

Also, I thought the (void*) data type which the thread takes means I can pass anything in there? I tried to just pass the object which I need to use inside the thread, but it wouldn't let me do that either.

Any help appreciated
Dec 12, 2012 at 6:33pm
This may work if Foo::Bar is static.
Dec 12, 2012 at 6:42pm
If I do that, I will then need the answer to my 2nd question aswell :D. I made them static within the class but then when I try to cast the (void* data) to the type of the object I pass in, it says it can't do that either.
Dec 12, 2012 at 10:46pm
You're right, but if it isn't working you'll need to post the code for that.
Last edited on Dec 12, 2012 at 10:46pm
Topic archived. No new replies allowed.