random number generator class in c++