| jrfrago (12) | |
|
I have a function uci() it works when it is initiated in a thread with the following commmand: Thread^ newThread = gcnew Thread( gcnew ThreadStart(&uci)); newThread->Start(); However, when I require uci() to receive a parameter say uci(class * cPointer), it fails. | |
|
|
|
| vince1027 (137) | |
|
Your question should belong to the "Windows Programming" section as it is about use of C++/CLI. I am not very familiar with C++/CLI, but looking at the API reference, you would want to use the ParameterizedThreadStart delegate instead, then pass your argument to the Thread::Start method. | |
|
|
|
| jrfrago (12) | |
| Alright. I guess this is Windows specific, so how do I implement threading that would work in all platforms? And How do I pass the variables? | |
|
|
|
| coder777 (2383) | |
|
Take a look at boost: http://www.boost.org/doc/libs/1_52_0/doc/html/thread.html C++11 also has thread support | |
|
|
|