Random Numbers in GUI (Windows Forms)
I want to generate 5 random numbers in an integer array of size 5 in GUI (Windows Forms), how will I do this? (MS Visual Studio 2008). Thanks!!
Re: Random Numbers in GUI (Windows Forms)
This isn't the right forum for forms.
Generating random number is completely unrelated to any kind of GUI. What part are you stuck on?
Re: Random Numbers in GUI (Windows Forms)
Quote:
Originally Posted by
GCDEF
This isn't the right forum for forms.
Generating random number is completely unrelated to any kind of GUI. What part are you stuck on?
Code:
Random *r=new Random();
int x=r->Next(0,2);
This is how Im trying to fill the array with random numbers but the code above doesn't work in Visual Studio 2008 (It worked with the previous version somehow), this is what Im trying to do.
Re: Random Numbers in GUI (Windows Forms)
You should take this to a .net forum.
Re: Random Numbers in GUI (Windows Forms)
You mean:
Code:
Random^ r = gcnew Random();
int x=r->Next(0,2);
Re: Random Numbers in GUI (Windows Forms)
Re: Random Numbers in GUI (Windows Forms)
Quote:
Originally Posted by
cilu
You mean:
Code:
Random^ r = gcnew Random();
int x=r->Next(0,2);
Thanks! :)