I need help with a program
I Need to do a program in C++ with function where the user try too guess a 4 digit random number using 2 function, the first one is generateTheNumber it just generate the random number, and the second one called guessTheNumber is going to do the following things: make the user give on input a number, compare the inserted number with the random number and if the inserted number is greater than the random one the program will print: the inserted number is too big, otherwise if the inserted number is lower than the random number the program will say: the inserted number is too small. I tried to do in this way but It doesn't work, i think there is a problem with the random number because is value isn't "carried" in the main function. Can someone help me with this? Thanks in advance and sorry if i wrote bad in English https://code.sololearn.com/c3z77uD6Mj17/?ref=app