I'm trying to create a simple game in C++ that generates a random number and, when the user guesses incorrectly, tells the user whether they need to guess higher or lower to guess the generated number. The problem is that the only number that's been generated is 42. I'm pretty sure that the rand() function has a predetermined set of random numbers to use, but I was wondering if there was a better way for me to do this without straying too far from the use of functions.