把switch 语句和 cout 语句用{}括起来。改成下面的结构:
if (/*你的条件*/) { switch() { // } cout << ""; }else { switch() { // } cout << ""; }
把cout放到括号里面去