I have to write a program that will run a random guessing game. The game is to be numbers from 1-100, the guesser gets 20 tries and at the end is supposed to be asked if they wo
[EDIT: Added cast to get rid of compiler warning.]
As Jim Rhodes said in a comment, the problem is with the line
srand(number>0);
srand() is used for initialising the random number generator, so it doesn't make sense to call it with number>0, or even with number at all. It wants a "seed" value, that should be different every time you run the program. A common way to get such a seed is by using the system time:
srand(static_cast(time(NULL)));
You might need to #include another header to get access to time().