Problem fuelstation
User thisusernameistaken
Submission Time 2024-02-20 22:52:31
Score 0
Max Time N/A
Max Memory N/A

Compile Error

fuelstation.cpp:75:4: error: ISO C++ forbids declaration of ‘seg’ with no type [-fpermissive]
75 | } *seg;
| ^~~
fuelstation.cpp:105:1: error: expected ‘}’ at end of input
105 | }
| ^
fuelstation.cpp:13:1: note: to match this ‘{’
13 | {
| ^
fuelstation.cpp: In member function ‘int SEG::main()’:
fuelstation.cpp:89:9: error: cannot convert ‘SEG*’ to ‘int*’ in assignment
89 | seg=new SEG(0, n);
| ^~~~~~~~~~~~~
| |
| SEG*
fuelstation.cpp:92:14: error: request for member ‘update’ in ‘*((SEG*)this)->SEG::seg’, which is of non-class type ‘int’
92 | seg->update(i, -get<0>(s[i]));
| ^~~~~~
fuelstation.cpp:93:26: error: request for member ‘update’ in ‘*((SEG*)this)->SEG::seg’, which is of non-class type ‘int’
93 | if (i+1<=n) seg->update(i+1, n, get<1>(s[i]));
|