I'm really not sure if it's called error trapping or not since I can't find any tutorials on it but that's the term my teacher taught me. Error trapping is so you can stop the person entering an information you don't want like I'm programming a classic game called Nim where a person picks up 1-3 sticks. But for some reason, even though I think the while loop is right, it won't let me enter a single thing.
getch() doenst wait for input. So on your second line the programming wont wait, and I think take already got a value so the while-condition will be false.