I use rand() to generate random numbers between 0-50.
However when I use the code, as I have seen it, rand() doesn´t truly generate random numbers.
It seems that everytime I restart the application, it generates the same random numbers everytime.
It seems that there is any mathematical sequence the function goes through and by that generate "random" numbers.
Is there any better method or function that is closer to generate random numbers than rand(). ?
int Number5 = 0;
System::String^ text;
for( int i = 0; i < 20; i++ )
{
Number5 = rand() % (51) + 0;
stringstream v1;
std::string v2;
v1 << Number5;
v2 = v1.str();
String^ Number = gcnew String(v2.c_str());
this->textBox1->Text = text;
this->textBox1->Multiline = true;
this->textBox1->WordWrap = false;
text += Number + System::Environment::NewLine;
}