Problema | esteArbore | Operații I/O |
![]() estearbore.in /estearbore.out
|
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #57748786 | Utilizator | |
Fișier | estearbore.cpp | Dimensiune | 1.85 KB |
Data încărcării | 14 Aprilie 2025, 11:03 | Scor / rezultat | Eroare de compilare |
estearbore.cpp:29:9: error: extra qualification 'complex1::' on member 'complex1' [-fpermissive] complex1 :: complex1(float x = 0, float y = 0) ^ estearbore.cpp:29:9: error: 'complex1::complex1(float, float)' cannot be overloaded estearbore.cpp:12:9: error: with 'complex1::complex1(float, float)' complex1(float x = 0, float y = 0) ^ estearbore.cpp:33:9: error: extra qualification 'complex1::' on member 'complex1' [-fpermissive] complex1 :: complex1(complex1 &t){ ^ estearbore.cpp:33:9: error: 'complex1::complex1(complex1&)' cannot be overloaded estearbore.cpp:18:9: error: with 'complex1::complex1(complex1&)' complex1(complex1& z); ^ estearbore.cpp:40:14: error: extra qualification 'complex1::' on member 'afisare' [-fpermissive] void complex1:: afisare(){ ^ estearbore.cpp:40:14: error: 'void complex1::afisare()' cannot be overloaded estearbore.cpp:19:14: error: with 'void complex1::afisare()' void afisare(); ^ estearbore.cpp:43:14: error: extra qualification 'complex1::' on member 'citire' [-fpermissive] void complex1 :: citire(){ ^ estearbore.cpp:43:14: error: 'void complex1::citire()' cannot be overloaded estearbore.cpp:20:14: error: with 'void complex1::citire()' void citire(); ^ estearbore.cpp:47:54: error: 'std::ifstream& complex1::operator>>(std::ostream&, complex1&)' must take exactly one argument ifstream &operator>>(ostream &os, complex1 &z){ ^ estearbore.cpp:50:55: error: 'std::ostream& complex1::operator<<(std::ostream&, complex1&)' must take exactly one argument ostream &operator << (ostream &os, complex1 &z){ ^ estearbore.cpp:53:52: error: 'complex1 complex1::operator+(complex1, complex1)' must take either zero or one argument complex1 operator+(complex1 z1, complex1 z2) ^ estearbore.cpp: In member function 'float complex1::modulo()': estearbore.cpp:9:36: error: 'sqrt' was not declared in this scope return sqrt(re*re+im*im); ^ estearbore.cpp: In copy constructor 'complex1::complex1(complex1&)': estearbore.cpp:35:19: error: request for member 're' in 'z', which is of non-class type 'float' x = z.re; ^ estearbore.cpp:36:19: error: request for member 'im' in 'z', which is of non-class type 'float' y = z.im; ^ estearbore.cpp:38:20: error: returning a value from a constructor return c; ^ estearbore.cpp: In function 'int main()': estearbore.cpp:67:13: error: cannot bind 'std::ostream {aka std::basic_ostream<char>}' lvalue to 'std::basic_ostream<char>&&' cout << a; ^ In file included from /usr/include/c++/4.8/iostream:39:0, from estearbore.cpp:1: /usr/include/c++/4.8/ostream:602:5: error: initializing argument 1 of 'std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&&, const _Tp&) [with _CharT = char; _Traits = std::char_traits<char>; _Tp = complex1]' operator<<(basic_ostream<_CharT, _Traits>&& __os, const _Tp& __x) ^ estearbore.cpp:68:14: error: redeclaration of 'complex1 b' complex1 b; ^ estearbore.cpp:66:17: error: 'complex1 b' previously declared here complex1 a, b; ^ estearbore.cpp:72:13: error: cannot bind 'std::ostream {aka std::basic_ostream<char>}' lvalue to 'std::basic_ostream<char>&&' cout << d; ^ In file included from /usr/include/c++/4.8/iostream:39:0, from estearbore.cpp:1: /usr/include/c++/4.8/ostream:602:5: error: initializing argument 1 of 'std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&&, const _Tp&) [with _CharT = char; _Traits = std::char_traits<char>; _Tp = complex1]' operator<<(basic_ostream<_CharT, _Traits>&& __os, const _Tp& __x) ^ estearbore.cpp: In member function 'float complex1::modulo()': estearbore.cpp:10:9: warning: control reaches end of non-void function [-Wreturn-type] } ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema esteArbore face parte din prima categorie. Soluția propusă de tine va fi evaluată astfel:
Suma punctajelor acordate pe testele utilizate pentru verificare este 100. Astfel, soluția ta poate obține cel mult 100 de puncte, caz în care se poate considera corectă.