#3539
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 | #64234047 | Utilizator | |
| Fișier | oop_numere_complexe.cpp | Dimensiune | 1.85 KB |
| Data încărcării | 24 Aprilie 2026, 12:24 | Scor/rezultat | Eroare de compilare |
oop_numere_complexe.cpp:35:7: error: redefinition of ‘class Complex’ 35 | class Complex | ^~~~~~~ oop_numere_complexe.cpp:4:7: note: previous definition of ‘class Complex’ 4 | class Complex | ^~~~~~~ oop_numere_complexe.cpp:92:1: error: ‘friend’ used outside of class 92 | friend ostream & operator << (ostream & out, const Complex & c) | ^~~~~~ | ------ oop_numere_complexe.cpp:100:1: error: ‘Complex::Complex’ names the constructor, not the type 100 | Complex::Complex operator +(Complex C) | ^~~~~~~ oop_numere_complexe.cpp:107:1: error: ‘Complex::Complex’ names the constructor, not the type 107 | Complex::Complex operator -(Complex C) | ^~~~~~~ oop_numere_complexe.cpp:114:1: error: ‘Complex::Complex’ names the constructor, not the type 114 | Complex::Complex operator *(Complex C) | ^~~~~~~ oop_numere_complexe.cpp:133:5: error: redefinition of ‘int main()’ 133 | int main() | ^~~~ oop_numere_complexe.cpp:122:5: note: ‘int main()’ previously defined here 122 | int main() | ^~~~
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ă.