So, when i get to this section of code, the while loop doesn't work, the programme just stops, i am wanting the loop to repeat if the user selects anything other than 1, 2 or 3
cout << "Please select your difficulty" << endl << endl;
if (difficulty == 1)
{
cout << "You've chosen the easy way out, i can't say i blame ya!" << endl << endl;
}
else if (difficulty == 2)
{
cout << "So you like a challenge, good for you but big mistake!" << endl << endl;
}
else if (difficulty == 3)
{
cout << "You must be out of your god damm mind!" << endl << endl;
}
else cout << "You have selected an invalid option" << endl << endl;
Ok, thank you, i should have said, i'm new to programming and just learning the basics at the minute, i have changed it as you have suggested, if i select 1, 2, or 3 the loop ends and the programme continues so that's great and one problem solved, but if i say select 4 for example, i am looking to get the message "You have selected an invalid option" and to be asked to select the difficulty again but the programme just stops there and only displays the message "You have selected an invalid option"