Main.cc: In function 'int main()': Main.cc:16:5: error: case label not within a switch statement default: ^ Main.cc:17:21: error: break statement not within loop or switch cout<<"YES";break; ^ Main.cc: At global scope: Main.cc:57:5: error: expected unqualified-id before 'return' return 0; ^ Main.cc:58:1: error: expected declaration before '}' token } ^