I made a selection menu through text for an rpg, and need a way to say, - if the input the user gave didnt match the list of possible inputs, "error", and loop to the beggining of the program.
while( true ) {
string in;
cout << "Enter a string\n";
getline( cin, in );
if( in == "a string" ) {
//do stuff
break;
}else cout << "This is not a string\n";
}