Borderou de evaluare (job #2278631)
Utilizator | Data | 8 noiembrie 2018 12:49:57 | |
---|---|---|---|
Problema | Liste | Status | done |
Runda | Arhiva de probleme | Compilator | cpp-64 | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
main.cpp: In function 'void match()':
main.cpp:29:10: error: return-statement with a value, in function returning 'void' [-fpermissive]
return ok;
^~
main.cpp: In function 'int main()':
main.cpp:52:31: error: could not convert 'match()' from 'void' to 'bool'
while( !s.empty() && match() )
~~~~~^~
main.cpp:55:13: error: no matching function for call to 'std::stack<Liste>::push(int&)'
s.push(k);
^
In file included from /usr/include/c++/6/stack:61:0,
from main.cpp:2:
/usr/include/c++/6/bits/stl_stack.h:218:7: note: candidate: void std::stack<_Tp, _Sequence>::push(const value_type&) [with _Tp = Liste; _Sequence = std::deque<Liste, std::allocator<Liste> >; std::stack<_Tp, _Sequence>::value_type = Liste]
push(const value_type& __x)
^~~~
/usr/include/c++/6/bits/stl_stack.h:218:7: note: no known conversion for argument 1 from 'int' to 'const value_type& {aka const Liste&}'
/usr/include/c++/6/bits/stl_stack.h:223:7: note: candidate: void std::stack<_Tp, _Sequence>::push(std::stack<_Tp, _Sequence>::value_type&&) [with _Tp = Liste; _Sequence = std::deque<Liste, std::allocator<Liste> >; std::stack<_Tp, _Sequence>::value_type = Liste]
push(value_type&& __x)
^~~~
/usr/include/c++/6/bits/stl_stack.h:223:7: note: no known conversion for argument 1 from 'int' to 'std::stack<Liste>::value_type&& {aka Liste&&}'
main.cpp:58:26: warning: format '%d' expects argument of type 'int', but argument 2 has type 'std::stack<Liste>::size_type {aka long unsigned int}' [-Wformat=]
printf( "%d", s.size() );
^
main.cpp:35:36: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)', declared with attribute warn_unused_result [-Wunused-result]
freopen( "liste.in", "r", stdin );
^
main.cpp:36:38: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)', declared with attribute warn_unused_result [-Wunused-result]
freopen( "liste.out", "w", stdout );
^
main.cpp:40:20: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf( "%d", &n );
^
main.cpp:44:22: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf( "%d", &m );
^
main.cpp:48:24: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf( "%d", &k );
^
Non zero exit status: 1
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !