visual c++ - Initialize a managed array of thread -


I succeeded in compiling the following code, but I would have to make an array of thread out of it. Form 1 ^ form1obj = gcnew form 1 (); Thread ^ bfcaller = gcnew thread (gcnew threadstart (form1obj, & form1 :: bruteforce)); Bfcaller- & gt; Start ();

I found it to be errors by array like this:

  array of the & lt; Form1 ^ & gt; ^ Form1obj = gcnew of the array & lt; Form1 ^ & gt; (25); Array & lt; Thread ^ & gt; ^ Bfcaller = gcnew array & lt; Thread ^ & gt; [25]; {Bfcaller [counter] gcnew thread = (gcnew ThreadStart (form1obj, & amp; Form1 :: bruteforce)) for the integer counter (= 0; counter by <25; counter ++); }   

Where was it wrong to me? Thanks for the help.

After text "itemprop =" text ">

Many syntax mistakes in your code.

  Gcnew array & lt; Thread ^ & gt; [25];   

Do not use square brackets, use (25)

  gcnew ThreadStart (form1obj, & Form1 :: bruteforce)   

Comments