Hi ! I'm trying to build a class that will use the std::tr1::lognormal_distribution class but I'm having trouble putting it all together in my new class...how should it be done ?
Thanks !
1 2 3 4 5 6 7 8 9 10 11
CSleeper::CSleeper(double m, double sd)
{
default_random_engine generator(ULONG(time(0))); //random seed
lognormal_distribution<double> distribution(m, sd); //set the dist params
}
void CSleeper::Sleep(int outlay)
{
int x = distribution(generator); //error 'distribution' and 'generator' unidentified
//...
}