pringscreem / FileCombiner

C++ program to combine multiple other C++ source files into one file by appending them to a single .cpp file
0 stars 0 forks source link

Fix the Non-Random Number in the Guessing Game #4

Closed pringscreem closed 1 month ago

pringscreem commented 2 months ago

Fix the random number generator in the guessing game so that it actually generates a random number.

pringscreem commented 2 months ago

Low priority.

pringscreem commented 1 month ago

Fixed. First it was not being initialized at all (probably left as a future task because the Guessing Game is just an example for testing the FileCombiner).

Then it was being initialized before the random number generation variables, which made it non-random and not in the desired range. This was fixed by moving it below the random number generation variables in the class declaration because C++ uses the order of declaration of variables in the class declaration, not the order of variables in the initializer list (in the constructor).