我试图让这个while循环工作,但由于某种原因,它会自动“假设”用户输入错误。
value
是字符串(应该是字符吗?)
A
,B
是C
字符串(应该是字符吗?)
void Course::set()
{
cout << "blah blah blah" << endl;
cout << "youre options are A, B, C" <<endl;
cin >> value;
while(Comp != "A" || Comp != "B" || Comp != "C")
{
cout << "The character you enter is not correct, please enter one of the following: You're options are A, B, C" << endl;
cin >> value;
}
cout << endl;
}