Problem brick
User wtnetlegend
Submission Time 2025-02-08 00:13:27
Score 0
Max Time N/A
Max Memory N/A

Compile Error

brick.cpp: In function ‘int main()’:
brick.cpp:5:8: error: expected primary-expression before ‘int’
5 | int a[int n];
| ^~~
brick.cpp:5:8: error: expected ‘]’ before ‘int’
5 | int a[int n];
| ^~~
| ]
brick.cpp:6:9: error: ‘n’ was not declared in this scope; did you mean ‘yn’?
6 | cin >> n;
| ^
| yn
brick.cpp:8:10: error: ‘a’ was not declared in this scope
8 | cin >> a[i];
| ^
brick.cpp:11:10: error: ‘a’ was not declared in this scope
11 | s.push (a[0]);
| ^
brick.cpp:17:10: error: expected ‘;’ before ‘a’
17 | s.push a[i];
| ^~
| ;
brick.cpp:17:6: error: statement cannot resolve address of overloaded function
17 | s.push a[i];
| ~~^~~~
brick.cpp:21:12: error: no match for ‘operator[]’ (operand types are ‘std::stack<int>’ and