| Problema | oop_3 | Operații I/O |
oop_3.in/oop_3.out
|
|---|---|---|---|
| Limita timp | 0.2 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #64724081 | Utilizator | |
| Fișier | oop_3.cpp | Dimensiune | 636 B |
| Data încărcării | 26 Mai 2026, 10:04 | Scor/rezultat | Eroare de compilare |
oop_3.cpp:4:1: error: expected unqualified-id before ‘private’ 4 | private: | ^~~~~~~ oop_3.cpp:7:1: error: expected unqualified-id before ‘public’ 7 | public: | ^~~~~~ oop_3.cpp: In function ‘void Push(int)’: oop_3.cpp:16:12: error: ‘niv’ was not declared in this scope; did you mean ‘div’? 16 | if(niv < nmax - 1){ | ^~~ | div oop_3.cpp:16:18: error: ‘nmax’ was not declared in this scope; did you mean ‘fmax’? 16 | if(niv < nmax - 1){ | ^~~~ | fmax oop_3.cpp: In function ‘void Pop()’: oop_3.cpp:22:12: error: ‘niv’ was not declared in this scope; did you mean ‘div’? 22 | if(niv != 0) | ^~~ | div oop_3.cpp: In function ‘int Top()’: oop_3.cpp:26:12: error: ‘niv’ was not declared in this scope; did you mean ‘div’? 26 | if(niv != 0) | ^~~ | div oop_3.cpp: In function ‘int Max()’: oop_3.cpp:32:18: error: ‘niv’ was not declared in this scope; did you mean ‘div’? 32 | return v[niv]; | ^~~ | div oop_3.cpp: In function ‘int Empty()’: oop_3.cpp:35:12: error: ‘niv’ was not declared in this scope; did you mean ‘div’? 35 | if(niv == 0) | ^~~ | div oop_3.cpp: At global scope: oop_3.cpp:38:1: error: expected declaration before ‘}’ token 38 | }; | ^ oop_3.cpp: In function ‘int main()’: oop_3.cpp:45:5: error: ‘Stiva’ was not declared in this scope 45 | Stiva w; | ^~~~~ oop_3.cpp:53:13: error: ‘w’ was not declared in this scope 53 | w.Push(x); | ^ oop_3.cpp:56:13: error: ‘w’ was not declared in this scope 56 | w.Pop(); | ^ oop_3.cpp:58:21: error: ‘w’ was not declared in this scope 58 | fout << w.Top() << "\n"; | ^ oop_3.cpp:60:21: error: ‘w’ was not declared in this scope 60 | fout << w.Max() << "\n"; | ^ oop_3.cpp: In function ‘int Empty()’: oop_3.cpp:37:5: warning: control reaches end of non-void function [-Wreturn-type] 37 | } | ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema oop_3 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ă.