Problem area
User gthinh
Submission Time 2026-01-26 10:21:20
Score 0
Max Time N/A
Max Memory N/A

Compile Error

area.cpp: In function ‘std::string add(std::string, std::string)’:
area.cpp:15:9: error: ‘res’ was not declared in this scope
15 | res += (sum%10)+'0';
| ^~~
area.cpp:17:15: error: ‘res’ was not declared in this scope
17 | if(carry) res += carry+'0';
| ^~~
area.cpp:18:13: error: ‘res’ was not declared in this scope
18 | reverse(res.begin(), res.end());
| ^~~
area.cpp: At global scope:
area.cpp:21:5: error: expected unqualified-id before ‘if’
21 | if(carry){
| ^~
area.cpp:24:5: error: expected unqualified-id before ‘return’
24 | return a;
| ^~~~~~
area.cpp:25:1: error: expected declaration before ‘}’ token
25 | }
| ^