[Dev-C++] Random numbers with MS Visual C++
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Exuss D. <dra...@ce...> - 2001-11-04 15:18:02
|
Hi all,
I am using MS Visual C++ 6.0 as C++ compiler. When I use Borland
command line compiler, I use stdlib.h and I have random nubers. But
file stdlib.h from MS VC does't have neither random() nor randomize()
functions.
How to get random numbers when compiling console applications with
MS VC ?
Exuss
Example:
#include <iostream.h>
#include <stdlib.h>
void main()
{
randomize();
int number=random(100);
cout << "My random number:" << number << endl;
}
|