Create random powerup value from time DateTime ^DateTimeNow; DateTimeNow = DateTime::Now; SomeVariable = Convert::ToInt32(DateTimeNow->Minute) + Convert::ToInt32(DateTimeNow->Second) + Convert::ToInt32(DateTimeNow->Millisecond); //Create a random startup value
Category: Random
Creating Random
Create random number System::Random ^rand = gcnew System::Random(); //Creates seed value from system clock if no seed supplied iTemp = rand->Next(1, (100+1)); //Min possible value, max possible value+1 Fill an array Random ^rand = gcnew Random(); rand->NextBytes(DecodedHexFile); //Fill entire array with random values