I am trying to use the randomize function but I don't seem to have the random.h library. I am using Visual Studio 6.0. Can someone tell me where I could download this library so I can utilize this function.
TIA
Printable View
I am trying to use the randomize function but I don't seem to have the random.h library. I am using Visual Studio 6.0. Can someone tell me where I could download this library so I can utilize this function.
TIA
I wasn't aware there was a random.h header file. This should work fine:
Code:#include<time.h>
#include<iostream>
using namespace std;
int main()
{
srand(time(NULL));
int x=rand()%100; // random number from 0-99
cout<<x<<endl;
return 0;
}
The ANSI rand() and srand() are in
#include <cstdlib>
Err...there's boost/random.hpp under the boost library?
Is that what you are after?