-
May 18th, 2009, 08:27 AM
#1
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!!
-
May 18th, 2009, 08:32 AM
#2
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?
-
May 18th, 2009, 09:08 AM
#3
Re: Random Numbers in GUI (Windows Forms)
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.
-
May 18th, 2009, 10:36 AM
#4
Re: Random Numbers in GUI (Windows Forms)
You should take this to a .net forum.
-
May 18th, 2009, 01:53 PM
#5
Re: Random Numbers in GUI (Windows Forms)
You mean:
Code:
Random^ r = gcnew Random();
int x=r->Next(0,2);
-
May 18th, 2009, 01:54 PM
#6
Re: Random Numbers in GUI (Windows Forms)
-
May 21st, 2009, 07:28 AM
#7
Re: Random Numbers in GUI (Windows Forms)
Originally Posted by cilu
You mean:
Code:
Random^ r = gcnew Random();
int x=r->Next(0,2);
Thanks!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|