I want to loop a question and make it say "press Y to continue or N to quit" but I don't quite know how. I tried to do a while loop but they haven't worked well. Here's the code:
cout << "press Y to play again or anything else to close: "; cin >> val; if (val != "Y"&& val != "y") { spelaIgen = false; }}