Hi am trying to write a statement that checks a string using a while statment.
Basically while varA is not equal to "a" or "b" or "c" say "not a, b or c. try again"
Here is my first go.
This does not work. If I take out the B and C bit then it works. If not it always says that it isn't A B or C. What am I doing wrong?Code:while (thing.me != "A" || "B" || "C") { cout << "Not A B or C" << endl << "try it again" << endl; cin >> thing.me; };
Thanks
Ironfistchamp