#3539
oop_numere_complexe
C++
Ai primit definiția unei clase. Implementează toate metodele clasei.
Problema | oop_numere_complexe | Operații I/O | tastatură/ecran |
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #35134238 | Utilizator | |
Fișier | oop_numere_complexe.cpp | Dimensiune | 1.32 KB |
Data încărcării | 27 Februarie 2022, 12:29 | Scor / rezultat | Eroare de compilare |
oop_numere_complexe.cpp: In function 'std::ostream& operator<<(std::ostream&, const Complex&)': oop_numere_complexe.cpp:72:13: error: invalid use of 'this' in non-member function cout << this -> real(); ^ oop_numere_complexe.cpp:73:8: error: invalid use of 'this' in non-member function if(this -> imag() > 0) cout << '+' << this -> imag() << 'i'; ^ oop_numere_complexe.cpp:73:43: error: invalid use of 'this' in non-member function if(this -> imag() > 0) cout << '+' << this -> imag() << 'i'; ^ oop_numere_complexe.cpp:74:13: error: 'x' was not declared in this scope else if(x.imag()<0) cout << this -> imag() << 'i'; ^ oop_numere_complexe.cpp:74:33: error: invalid use of 'this' in non-member function else if(x.imag()<0) cout << this -> imag() << 'i'; ^ oop_numere_complexe.cpp:75:1: warning: no return statement in function returning non-void [-Wreturn-type] } ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema oop_numere_complexe face parte din a doua categorie. Pentru aceste probleme se folosește un program suport, furnizat de propunătorul problemei. 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ă.