| levone (31) | |
|
In my code you can see I am sending a void pointer of a void pointer array to my thread function.. This is the only way i could think of to do this, however is seems.. wrong.. Its messy, and doesn't seem like something that should ever have to be done.. http://levone.pastebin.com/LhDLB9Y2 http://pastebin.com/a12KKcF7 Is there a better or correct way to do this? | |
|
Last edited on
|
|
| helios (9442) | |||
Nearly all threading interfaces are used this way, or some variation thereof. Get used to it:
| |||
|
|
|||
| levone (31) | |
|
oh I see.. Well, using a struct(class in my case) like that is a good idea.. dunno why i don't think of it.. xD Will at least not be so messy. Thanks helios. | |
|
|
|
| Athar (3764) | |
| You'll want to use Boost.Thread - there's going to be none of this void* mess. | |
|
|
|
| levone (31) | |
|
I do use Boost for programs that are only for Computers. I use SDL for games that run on a bunch of different devices since SDL has been ported to every system I code for. | |
|
|
|