Borderou de evaluare (job #3146991)
Utilizator | Data | 23 august 2023 17:33:26 | |
---|---|---|---|
Problema | Desen | Status | done |
Runda | Arhiva de probleme | Compilator | cpp-64 | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
main.cpp: In constructor 'Edge::Edge(Point, Point)':
main.cpp:92:29: warning: 'Edge::to' will be initialized after [-Wreorder]
92 | Point from, to;
| ^~
main.cpp:92:23: warning: 'Point Edge::from' [-Wreorder]
92 | Point from, to;
| ^~~~
main.cpp:97:17: warning: when initialized here [-Wreorder]
97 | Edge(Point A, Point B) : to(A), from(B), dist(sqrt(sqrDistance(A, B))){};
| ^~~~
main.cpp: In function 'int main()':
main.cpp:177:21: error: no match for 'operator>>' (operand types are 'InParser' and 'Point')
177 | fin >> aux;
| ~~~ ^~ ~~~
| | |
| | Point
| InParser
main.cpp:33:27: note: candidate: 'InParser& InParser::operator>>(int&)'
33 | InParser& operator>>(int& n){
| ^~~~~~~~
main.cpp:33:43: note: no known conversion for argument 1 from 'Point' to 'int&'
33 | InParser& operator>>(int& n){
| ~~~~~^
main.cpp:50:27: note: candidate: 'InParser& InParser::operator>>(long long int&)'
50 | InParser& operator>>(long long& n){
| ^~~~~~~~
main.cpp:50:49: note: no known conversion for argument 1 from 'Point' to 'long long int&'
50 | InParser& operator>>(long long& n){
| ~~~~~~~~~~~^
In file included from /usr/include/c++/12.2.1/string:54,
from /usr/include/c++/12.2.1/bits/locale_classes.h:40,
from /usr/include/c++/12.2.1/bits/ios_base.h:41,
from /usr/include/c++/12.2.1/ios:42,
from /usr/include/c++/12.2.1/istream:38,
from /usr/include/c++/12.2.1/fstream:38,
from main.cpp:1:
/usr/include/c++/12.2.1/bits/basic_string.tcc:940:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
940 | operator>>(basic_istream<_CharT, _Traits>& __in,
| ^~~~~~~~
/usr/include/c++/12.2.1/bits/basic_string.tcc:940:5: note: template argument deduction/substitution failed:
main.cpp:177:24: note: 'InParser' is not derived from 'std::basic_istream<_CharT, _Traits>'
177 | fin >> aux;
| ^~~
In file included from /usr/include/c++/12.2.1/istream:1016:
/usr/include/c++/12.2.1/bits/istream.tcc:960:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _CharT&)'
960 | operator>>(basic_istream<_CharT, _Traits>& __in, _CharT& __c)
| ^~~~~~~~
/usr/include/c++/12.2.1/bits/istream.tcc:960:5: note: template argument deduction/substitution failed:
main.cpp:177:24: note: 'InParser' is not derived from 'std::basic_istream<_CharT, _Traits>'
177 | fin >> aux;
Non zero exit status: 1
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !