#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 | #58223781 | Utilizator | |
Fișier | oop_numere_complexe.cpp | Dimensiune | 1.68 KB |
Data încărcării | 21 Mai 2025, 08:44 | Scor / rezultat | Eroare de compilare |
oop_numere_complexe.cpp:32:1: error: expected unqualified-id before 'public' public: ^ oop_numere_complexe.cpp:39:13: error: expected unqualified-id before ')' token Complex() ^ oop_numere_complexe.cpp:64: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:86:11: error: within this context b.i += this->i; ^ oop_numere_complexe.cpp:86: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:87:11: error: within this context b.r += this->r; ^ oop_numere_complexe.cpp:87: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:94:11: error: within this context c.i = this->i - b.i; ^ oop_numere_complexe.cpp:94: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:94: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:95:11: error: within this context c.r = this->r - b.r; ^ oop_numere_complexe.cpp:95: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:95: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:102:11: error: within this context c.i = (this->r * b.i + this->i * b.r); ^ oop_numere_complexe.cpp:102: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:102:28: error: within this context c.i = (this->r * b.i + this->i * b.r); ^ oop_numere_complexe.cpp:102: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:102: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:103:11: error: within this context c.r = this->r * b.r - this->i * b.i; ^ oop_numere_complexe.cpp:103: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:103:27: error: within this context c.r = this->r * b.r - this->i * b.i; ^ oop_numere_complexe.cpp:103: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:103: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ă.