while(true) { // Get your value ... switch(enteredRoomType) { case 0: // All done - exit the app. exit(0); case 1: case 2: case 3: // All ok. break; default: cout << "Invalid room type"; continue; } ... }
if
if-else if
switch
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)