.net Thread^ array
Dec 11, 2012 at 2:43am UTC
I am working on an application that uses multiple threads to connect pipes to 8 other processes...so my question is how to i utilize an array of threads in .net C++?
I tried:
array<Thread>^ serverThread=gcnew<Thread>(8);
and then instantiate each thread using a loop:
1 2
serverThread[cnt]=gcnew Thread(stuff);
serverThread[cnt]->start();
this gets me an error regarding an upper level '^'...
How do i get this done?
Any help?
Dec 11, 2012 at 6:24am UTC
I figured it out...needed
array<Thread^>^ serverThread=gcnew<Thread^>(8);
I forgot it's an array of pointers to handles....Ultimately.
Used like any other object...like strings...
array<String^>^ stringArr...etc.
Solved...
Dec 11, 2012 at 10:25am UTC
You'd get better responses on a .NET forum rather than a C++ forum.
Topic archived. No new replies allowed.