Problem | smurf |
---|---|
User | YH |
Submission Time | 2024-02-06 16:57:08 |
Score | 0 |
Max Time | N/A |
Max Memory | N/A |
Owl Get a Life
smurf.cpp: In function ‘void reverse(int&, int&, int)’:
smurf.cpp:7:17: error: lvalue required as left operand of assignment
7 | start+x = end-x;
| ^
smurf.cpp:8:11: error: lvalue required as left operand of assignment
8 | end-x = temp;
| ^~~~
smurf.cpp: In function ‘int main()’:
smurf.cpp:24:11: error: invalid conversion from ‘int*’ to ‘int’ [-fpermissive]
24 | reverse(smurfs, smurfs+i, i);
| ^~~~~~
| |
| int*
smurf.cpp:4:19: note: initializing argument 1 of ‘void reverse(int&, int&, int)’
4 | void reverse(int& start, int& end, int i) {
| ~~~~~^~~~~
smurf.cpp:24:11: error: cannot bind rvalue ‘(int)((int*)(& smurfs))’ to ‘int&’
24 | reverse(smurfs, smurfs+i, i);
| ^~~~~~