Hah, never thought someone will put the computer to guess xD
And I don't think that computers are made for that, but it looks like one of those questions that need several head smashing in the wall to get over it.
Just so to make the game look more ... realistic. The computer knows what the number typed in is, so you can do the "higher" and "lower" with if statements, and adjust it every time the computer picks a random number. Hmm, I somehow forgot what I was talking about

)
So, yes, that's a good idea, it just seems so ... FATAL CRASH.
Later Edit:
Uh, what's that "PAUSE<<NULL" in system() function? Never saw that before. It works fine with just "PAUSE" ... no?
And another edit:
Sorry, wasan't paying attention to the main question, that 'computer guessing' kind of bluescreened me.
You could make an integer (int nCount = 0) and at the end of the while loop increse it, then put inside
while ( (cmpGuess!=theNumber) && (nCount < 5));
Hope this helps somewhat.