Like the others have said, you have an infinite loop when you enter a number. You aren't reading in a new character to process because you are skipping that step with the "continue" statement. Therefore you are processing the number over and over and skipping the cin.get step each time.
Let's say I enter the number 3 into your program. Your code will do this:
3 is not the @ symbol, so enter the while loop.
Is 3 a digit? Yes, so continue to the top of the while loop.
3 is not the @ symbol so enter the while loop
Is 3 a digit? Yes, so continue to the top of the while loop.
...
That will continue indefinitely since a new character is never read in for processing.
To minimally impact what you already have written, you could do something like this:
1 2 3 4
|
if(isdigit(ch)) {
cin.get(ch);
continue;
}
|