当你定义输入字符为char时,注意判断时字符是被单引号括起来的
例如,以下内容是错误的:
if(ch == "A") { cout << "food"; }
而以下内容是正确的
if(ch == 'A') { cout << "food"; }