Problem charges
User WJR
Submission Time 2025-02-20 22:04:29
Score 0
Max Time N/A
Max Memory N/A

Compile Error

charges.cpp: In function ‘int main()’:
charges.cpp:29:7: error: ‘word’ was not declared in this scope
29 | if (word == 'R'){
| ^~~~
charges.cpp:30:9: error: ‘a’ was not declared in this scope
30 | if(x[a].charge == 0 && x[b].charge == 0){
| ^
charges.cpp:30:29: error: ‘b’ was not declared in this scope
30 | if(x[a].charge == 0 && x[b].charge == 0){
| ^
charges.cpp:44:7: error: ‘word’ was not declared in this scope
44 | if (word == 'Q'){
| ^~~~
charges.cpp:45:9: error: ‘a’ was not declared in this scope
45 | if(x[a].charge == 0 || x[b].charge == 0){
| ^
charges.cpp:45:29: error: ‘b’ was not declared in this scope
45 | if(x[a].charge == 0 || x[b].charge == 0){
| ^
charges.cpp: At global scope:
charges.cpp:56:2: error: expected unqualified-id before ‘return’
56 | return 0