Problem 3nplus1II
User joshua2152
Submission Time 2023-05-03 15:08:25
Score 0
Max Time N/A
Max Memory N/A

Compile Error

3nplus1II.cpp: In lambda function:
3nplus1II.cpp:7:13: error: expected ‘{’ before ‘;’ token
7 | int ls = [];
| ^
3nplus1II.cpp: In function ‘int main()’:
3nplus1II.cpp:7:13: error: invalid user-defined conversion from ‘main()::<lambda()>’ to ‘int’ [-fpermissive]
3nplus1II.cpp:7:11: note: candidate is: ‘constexpr main()::<lambda()>::operator void (*)()() const’ <near match>
7 | int ls = [];
| ^
3nplus1II.cpp:7:11: note: no known conversion from ‘void (*)()’ to ‘int’
3nplus1II.cpp:15:8: error: invalid types ‘int[int]’ for array subscript
15 | ls[i] = n;
| ^
3nplus1II.cpp:20:8: error: invalid types ‘int[int]’ for array subscript
20 | ls[i] = n;
| ^
3nplus1II.cpp:24:6: error: expected ‘{’ before ‘cout’
24 | try cout >> ls[a+1];
| ^~~~
3nplus1II.cpp:24:6: error: expected ‘catch’ before ‘cout’
3nplus1II.cpp:24:6