I am working on a project and need to know how to create a thread in Managed C++ using VS 2005. I have tutorials but none of them work (from google and MSDN). Can anyone show me the correct code?
Anyone?
Declare this globally (or local but you'll have no control over it)
Then execute your thread likeCode:private: Threading::Thread^ myThread;
you need to change what I have bolded above (yourClass,Form1 and Function) to match your program.Code:Threading::ThreadStart^ threadStart = gcnew Threading::ThreadStart(this,&yourClass::Form1::Function); myThread = gcnew Threading::Thread(threadStart); myThread->Start();
Code:for (int i;;) { cout << "Smith"; }
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks