I'm trying to prompt for Y,y,Yes,yes - and I need help.
Here is what definitly doesn't work:
ThanksCode:#include <iostream> using std::cout; using std::cin; int main() { char c = ' '; while( c != 'y' || c != 'Y' || c != 'Yes' || c != 'yes' ) { cout << "Continue? (Y/N): "; cin.get(c); // Get character from user cin.ignore(1, '\n'); // Skip newline if( c == 'y' || c == 'Y' || c == 'yes' || c == 'Yes') cout << " you entered yes"; else cout << " you entered no"; } return 0; }