I am trying to save the state of a random number generator as follows:
std::mt19937 rng
std::ofstream ofile("RngState.txt");
ofile << rng;
ofile.close();
What I observe is the state is a vector of 1248 numbers And only 624 numbers get written in the file. Is there a way to write and read all the 1248 numbers in one attempt(I guess I am trying to increase the capacity/size of ofstream).
Thanks in advance.