How can I continue my question until the user enter the valid input?

Hello, I am writing a code in c++ and I need to ask the user to enter the number between 0-4

0= quit
1-4=do something

so at first I use do and while
for example
do
{
}
while (choice!=0);

so it goes back if the user enter any integer but0-4. However when the user enter a character. it won't work and it will quit right away.

Please help. if you wanna see my code please comment below.
closed account (48T7M4Gy)
http://www.cplusplus.com/forum/beginner/180614/
sorry @kemort (2314) I thought these forums are different. but how can I delete this?
closed account (48T7M4Gy)
No problem selflearner, treat it as a redirect for anyone planning to post rather than anything else. You don't need to delete this one. A lot of ppl do the same.
Topic archived. No new replies allowed.