switch default without "goto"

How should I use default case on switch without goto? I mean, if user's input is invalid, and I want user to type input again, how should I do that? Previously I used goto xxx; -statements, but everyone keeps saying that goto -statements are bad programming.
Last edited on
Use a while statement...
1
2
3
4
do
{
  get_user_input();
}while( user_input_is_not_valid );
Topic archived. No new replies allowed.