Borderou de evaluare (job #738822)
Utilizator |
|
IP | ascuns |
---|---|---|---|
Problemă | Turn (clasa a 6-a) | Compilator | cpp-32 |
Rundă | Arhiva de probleme | Status | evaluat |
Dată | 18 oct. 2023 10:24:12 | Scor | 0 |
Raport evaluator
Eroare de compilare:
main.cpp: In function 'int main()':
main.cpp:20:4: warning: this 'for' clause does not guard... [-Wmisleading-indentation]
20 | for(int i=0;i<n;i++)
| ^~~
main.cpp:22:5: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'for'
22 | reverse(v,v+n);
| ^~~~~~~
main.cpp:25:15: error: no matching function for call to 'std::stack<int>::push(tractor&)'
25 | s.push(v[i]);
| ~~~~~~^~~~~~
In file included from /usr/lib/gcc/i686-pc-linux-gnu/12/include/g++-v12/stack:61,
from main.cpp:2:
/usr/lib/gcc/i686-pc-linux-gnu/12/include/g++-v12/bits/stl_stack.h:260:7: note: candidate: 'void std::stack<_Tp, _Sequence>::push(const value_type&) [with _Tp = int; _Sequence = std::deque<int, std::allocator<int> >; value_type = int]'
260 | push(const value_type& __x)
| ^~~~
/usr/lib/gcc/i686-pc-linux-gnu/12/include/g++-v12/bits/stl_stack.h:260:30: note: no known conversion for argument 1 from 'tractor' to 'const std::stack<int>::value_type&' {aka 'const int&'}
260 | push(const value_type& __x)
| ~~~~~~~~~~~~~~~~~~^~~
/usr/lib/gcc/i686-pc-linux-gnu/12/include/g++-v12/bits/stl_stack.h:265:7: note: candidate: 'void std::stack<_Tp, _Sequence>::push(value_type&&) [with _Tp = int; _Sequence = std::deque<int, std::allocator<int> >; value_type = int]'
265 | push(value_type&& __x)
| ^~~~
/usr/lib/gcc/i686-pc-linux-gnu/12/include/g++-v12/bits/stl_stack.h:265:25: note: no known conversion for argument 1 from 'tractor' to 'std::stack<int>::value_type&&' {aka 'int&&'}
265 | push(value_type&& __x)
| ~~~~~~~~~~~~~^~~
main.cpp:36:25: error: expected unqualified-id before ')' token
36 | for(int )
| ^
main.cpp:36:24: error: expected ';' before ')' token
36 | for(int )
| ^~
| ;
main.cpp:36:25: error: expected primary-expression before ')' token
36 | for(int )
| ^
main.cpp:36:24: error: expected ';' before ')' token
36 | for(int )
| ^~
| ;
main.cpp:37:13: error: expected primary-expression before '}' token
37 | }
| ^
main.cpp:12:41: warning: unused variable 'pozinitial' [-Wunused-variable]
12 | int n,k,previous=-2,cnt=0,cntstac=0,pozinitial=0,pozfinal=0;
| ^~~~~~~~~~
main.cpp:12:54: warning: unused variable 'pozfinal' [-Wunused-variable]
12 | int n,k,previous=-2,cnt=0,cntstac=0,pozinitial=0,pozfinal=0;
| ^~~~~~~~