Problem greeting
User xyzidk9
Submission Time 2026-04-15 16:36:58
Score 0
Max Time N/A
Max Memory N/A

Compile Error

greeting.cpp:3:5: error: cannot declare ‘::main’ to be a global variable
3 | int main{
| ^~~~
greeting.cpp:4:9: error: expected primary-expression before ‘a’
4 | string a;
| ^
greeting.cpp:4:9: error: expected ‘}’ before ‘a’
greeting.cpp:3:9: note: to match this ‘{’
3 | int main{
| ^
greeting.cpp:5:2: error: ‘cin’ does not name a type; did you mean ‘sin’?
5 | cin >> a;
| ^~~
| sin
greeting.cpp:6:2: error: ‘cout’ does not name a type
6 | cout << a << " ni hao,xin nian kuai le!";
| ^~~~
greeting.cpp:7:1: error: expected declaration before ‘}’ token
7 | }
| ^