![]() |
Random Number Genorator
How do you make a random number genorator, in C++, between a set range?
Like 10-20? <-)-{Sir D |
Re: Random Number Genorator
Hello
First of all I would like to Welcome you to this community of programmers. Here is the code to do what you need Code:
int CWordsDlg::GetRandomNumer(int high,int low)Thanks Shabbir Bhimani |
Re: Random Number Genorator
Thanks, but where do i imput my range numbers? Like 7-10?
<-)-{Sir D |
Re: Random Number Genorator
As a parameter to the function and it will give result output a random number between the parameter high and low.
|
Re: Random Number Genorator
It says 'CWordsDlg' has not been declared.
<-)-{Sir D |
Re: Random Number Genorator
Just remove that
Code:
int GetRandomNumer(int high,int low) |
Re: Random Number Genorator
Errors:
[Linker error]uderline reference to 'WinMain@16' Id returned 1 exit status <-)-{Sir D |
Re: Random Number Genorator
Linker error are because there are some errors in your Main Program and not in the code given above.
|
| All times are GMT +5.5. The time now is 15:56. |