Problem leftright
User Duk168
Submission Time 2024-06-29 12:48:31
Score 0
Max Time N/A
Max Memory N/A

Compile Error

leftright.cpp:73:4: error: ISO C++ forbids declaration of ‘arr’ with no type [-fpermissive]
73 | } *arr;
| ^~~
leftright.cpp:92:1: error: expected ‘}’ at end of input
92 | }
| ^
leftright.cpp:6:11: note: to match this ‘{’
6 | struct lnr{
| ^
leftright.cpp: In member function ‘void lnr::input(long long int)’:
leftright.cpp:43:15: error: a function-definition is not allowed here before ‘{’ token
43 | void rev(){
| ^
leftright.cpp:54:18: error: a function-definition is not allowed here before ‘{’ token
54 | void output(){
| ^
leftright.cpp: In member function ‘int lnr::main()’:
leftright.cpp:79:11: error: cannot convert ‘lnr*’ to ‘int*’ in assignment
79 | arr = new lnr;
| ^~~~~~~
| |
| lnr*
leftright.cpp:86:18: error: request for member ‘input’ in ‘*((lnr*)this)->lnr::ar