ranNum = rand() % (100 - 1);
is exactly same as: ranNum = rand() % 99;
The remainder of division a % b must by definition be less than b.
Therefore, you will get values in [0..98]
I am only creating one string at a time, and it is meant to be replaced by the new random number each time the loop iterates. There's a condition that stops the loop and prints out the string at that iteration.
I'll read the documentation you sent.
Thank you.
*edit after reading**
Okay, so I'm looking at something like this....
1 2 3 4 5 6 7 8
std::default_random_engine generator;
std::uniform_int_distribution<int> distribution(1,100);
for (int i=0; i < MAX; ++i) {
ranNum = distribution(generator);
s = to_string(ranNum);