#3539
Ai primit definiția unei clase. Implementează toate metodele clasei.
Problema | oop_numere_complexe | Operații I/O |
![]() |
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #58223805 | Utilizator | |
Fișier | oop_numere_complexe.cpp | Dimensiune | 1.73 KB |
Data încărcării | 21 Mai 2025, 08:45 | Scor / rezultat | Eroare de compilare |
oop_numere_complexe.cpp:34:1: error: expected unqualified-id before 'public' public: ^ oop_numere_complexe.cpp:41:13: error: expected unqualified-id before ')' token Complex() ^ oop_numere_complexe.cpp:66:5: error: 'friend' used outside of class friend ostream& operator<<(ostream &out , const Complex &a) ^ oop_numere_complexe.cpp: In function 'Complex operator+(Complex)': oop_numere_complexe.cpp:7:9: error: 'int Complex::i' is private int i, r; ^ oop_numere_complexe.cpp:88:11: error: within this context b.i += this->i; ^ oop_numere_complexe.cpp:88:16: error: invalid use of 'this' in non-member function b.i += this->i; ^ oop_numere_complexe.cpp:7:12: error: 'int Complex::r' is private int i, r; ^ oop_numere_complexe.cpp:89:11: error: within this context b.r += this->r; ^ oop_numere_complexe.cpp:89:16: error: invalid use of 'this' in non-member function b.r += this->r; ^ oop_numere_complexe.cpp: In function 'Complex operator-(Complex)': oop_numere_complexe.cpp:7:9: error: 'int Complex::i' is private int i, r; ^ oop_numere_complexe.cpp:96:11: error: within this context c.i = this->i - b.i; ^ oop_numere_complexe.cpp:96:15: error: invalid use of 'this' in non-member function c.i = this->i - b.i; ^ oop_numere_complexe.cpp:7:9: error: 'int Complex::i' is private int i, r; ^ oop_numere_complexe.cpp:96:27: error: within this context c.i = this->i - b.i; ^ oop_numere_complexe.cpp:7:12: error: 'int Complex::r' is private int i, r; ^ oop_numere_complexe.cpp:97:11: error: within this context c.r = this->r - b.r; ^ oop_numere_complexe.cpp:97:15: error: invalid use of 'this' in non-member function c.r = this->r - b.r; ^ oop_numere_complexe.cpp:7:12: error: 'int Complex::r' is private int i, r; ^ oop_numere_complexe.cpp:97:27: error: within this context c.r = this->r - b.r; ^ oop_numere_complexe.cpp: In function 'Complex operator*(Complex)': oop_numere_complexe.cpp:7:9: error: 'int Complex::i' is private int i, r; ^ oop_numere_complexe.cpp:104:11: error: within this context c.i = (this->r * b.i + this->i * b.r); ^ oop_numere_complexe.cpp:104:16: error: invalid use of 'this' in non-member function c.i = (this->r * b.i + this->i * b.r); ^ oop_numere_complexe.cpp:7:9: error: 'int Complex::i' is private int i, r; ^ oop_numere_complexe.cpp:104:28: error: within this context c.i = (this->r * b.i + this->i * b.r); ^ oop_numere_complexe.cpp:104:32: error: invalid use of 'this' in non-member function c.i = (this->r * b.i + this->i * b.r); ^ oop_numere_complexe.cpp:7:12: error: 'int Complex::r' is private int i, r; ^ oop_numere_complexe.cpp:104:44: error: within this context c.i = (this->r * b.i + this->i * b.r); ^ oop_numere_complexe.cpp:7:12: error: 'int Complex::r' is private int i, r; ^ oop_numere_complexe.cpp:105:11: error: within this context c.r = this->r * b.r - this->i * b.i; ^ oop_numere_complexe.cpp:105:15: error: invalid use of 'this' in non-member function c.r = this->r * b.r - this->i * b.i; ^ oop_numere_complexe.cpp:7:12: error: 'int Complex::r' is private int i, r; ^ oop_numere_complexe.cpp:105:27: error: within this context c.r = this->r * b.r - this->i * b.i; ^ oop_numere_complexe.cpp:105:31: error: invalid use of 'this' in non-member function c.r = this->r * b.r - this->i * b.i; ^ oop_numere_complexe.cpp:7:9: error: 'int Complex::i' is private int i, r; ^ oop_numere_complexe.cpp:105:43: error: within this context c.r = this->r * b.r - this->i * b.i; ^
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ă.