Random number generation for Monte Carlo in C++