0
What's wrong here?
#include <iostream> using namespace std; int age = 42; if (age == 18) { cout << "Young" << endl; } if (age == 42) { cout << "Adult" << endl; } if (age == 70) { cout << "Senior" << endl; } Error: ./Playground/file0.cpp:5:1: error: expected unqualified-id before 'if' | if (age == 18) { | ^~ Error: ./Playground/file0.cpp:5:1: error: expected unqualified-id before 'if' | if (age == 42) { | ^~ Error: ./Playground/file0.cpp:5:1: error: expected unqualified-id before 'if' | if (age == 70) { | ^~
2 odpowiedzi
+ 3
Looks like you accidentally deleted the main method...
- 1
Looks like you accidentally deleted the main method...