Borderou de evaluare (job #777799)
Utilizator |
|
IP | ascuns |
---|---|---|---|
Problemă | Dezechilibru (clasa a 5-a) | Compilator | cpp-32 |
Rundă | Arhiva de probleme | Status | evaluat |
Dată | 16 mai 2024 18:20:36 | Scor | 0 |
Raport evaluator
Eroare de compilare:
main.cpp: In function 'int main()':
main.cpp:12:9: error: 'cin' was not declared in this scope
12 | cin>>a;
| ^~~
main.cpp:2:1: note: 'std::cin' is defined in header '<iostream>'; did you forget to '#include <iostream>'?
1 | #include <fstream>
+++ |+#include <iostream>
2 |
main.cpp:39:8: error: no match for 'operator<' (operand types are 'std::ofstream' {aka 'std::basic_ofstream<char>'} and 'long long int')
39 | out<maxnr;
| ~~~^~~~~~
| | |
| | long long int
| std::ofstream {aka std::basic_ofstream<char>}
main.cpp:39:8: note: candidate: 'operator<(int, long long int)' (built-in)
39 | out<maxnr;
| ~~~^~~~~~
main.cpp:39:8: note: no known conversion for argument 1 from 'std::ofstream' {aka 'std::basic_ofstream<char>'} to 'int'
In file included from /usr/lib/gcc/i686-pc-linux-gnu/13/include/g++-v13/string:48,
from /usr/lib/gcc/i686-pc-linux-gnu/13/include/g++-v13/bits/locale_classes.h:40,
from /usr/lib/gcc/i686-pc-linux-gnu/13/include/g++-v13/bits/ios_base.h:41,
from /usr/lib/gcc/i686-pc-linux-gnu/13/include/g++-v13/ios:44,
from /usr/lib/gcc/i686-pc-linux-gnu/13/include/g++-v13/istream:40,
from /usr/lib/gcc/i686-pc-linux-gnu/13/include/g++-v13/fstream:40,
from main.cpp:1:
/usr/lib/gcc/i686-pc-linux-gnu/13/include/g++-v13/bits/stl_iterator.h:455:5: note: candidate: 'template<class _Iterator> bool std::operator<(const reverse_iterator<_Iterator>&, const reverse_iterator<_Iterator>&)'
455 | operator<(const reverse_iterator<_Iterator>& __x,
| ^~~~~~~~
/usr/lib/gcc/i686-pc-linux-gnu/13/include/g++-v13/bits/stl_iterator.h:455:5: note: template argument deduction/substitution failed:
main.cpp:39:9: note: 'std::ofstream' {aka 'std::basic_ofstream<char>'} is not derived from 'const std::reverse_iterator<_Iterator>'
39 | out<maxnr;
| ^~~~~
/usr/lib/gcc/i686-pc-linux-gnu/13/include/g++-v13/bits/stl_iterator.h:500:5: note: candidate: 'template<class _IteratorL, class _IteratorR> bool std::operator<(const reverse_iterator<_Iterator>&, const reverse_iterator<_IteratorR>&)'
500 | operator<(const reverse_iterator<_IteratorL>& __x,
| ^~~~~~~~
/usr/lib/gcc/i686-pc-linux-gnu/13/include/g++-v13/bits/stl_iterator.h:500:5: note: template argument deduction/substitution failed:
main.cpp:39:9: note: 'std::ofstream' {aka 'std::basic_ofstream<char>'} is not derived from 'const std::reverse_iterator<_Iterator>'
39 | out<maxnr;
| ^~~~~
/usr/lib/gcc/i686-pc-linux-gnu/13/include/g++-v13/bits/stl_iterator.h:1705:5: note: candidate: 'template<class _IteratorL, class _IteratorR> bool std::operator<(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&)'
1705 | operator<(const move_iterator<_IteratorL>& __x,
| ^~~~~~~~
/usr/lib/gcc/i686-pc-linux-gnu/13/include/g++-v13/bits/stl_iterator.h:1705:5: note: template argument deduction/substitution failed:
main.cpp:39:9: note: 'std::ofstream' {aka 'std::basic_ofstream<char>'} is not derived from 'const std::move_iterator<_IteratorL>'
39 | out<maxnr;
| ^~~~~
/usr/lib/gcc/i686-pc-linux-gnu/13/include/g++-v13/bits/stl_iterator.h:1770:5: note: candidate: 'template<class _Iterator> bool std::operator<(const move_iterator<_IteratorL>&, const move_iterator<_IteratorL>&)'
1770 | operator<(const move_iterator<_Iterator>& __x,
| ^~~~~~~~
/usr/lib/gcc/i686-pc-linux-gnu/13/include/g++-v13/bits/stl_iterator.h:1770:5: note: template argument deduction/substitution failed: