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 | #23024768 | Utilizator | |
Fișier | oop_3.cpp | Dimensiune | 440 B |
Data încărcării | 19 Mai 2020, 09:20 | Scor / rezultat | Eroare de compilare |
oop_3.cpp: In function 'void Push(int)': oop_3.cpp:6:9: error: 'a' was not declared in this scope a[++top] = x; ^ oop_3.cpp:6:13: error: 'top' was not declared in this scope a[++top] = x; ^ oop_3.cpp: In function 'void Pop()': oop_3.cpp:11:9: error: 'top' was not declared in this scope top--; ^ oop_3.cpp: In function 'int Top()': oop_3.cpp:16:16: error: 'a' was not declared in this scope return a[top]; ^ oop_3.cpp:16:18: error: 'top' was not declared in this scope return a[top]; ^ oop_3.cpp: In function 'int Max()': oop_3.cpp:22:29: error: 'top' was not declared in this scope for(int i = 1; i <= top; i++) ^ oop_3.cpp:23:32: error: 'a' was not declared in this scope maxim = max(maxim, a[i]); ^ oop_3.cpp: In function 'int Empty()': oop_3.cpp:29:17: error: 'top' was not declared in this scope return (top != 0); ^ oop_3.cpp: In function 'int main()': oop_3.cpp:38:5: error: 'Stiva' was not declared in this scope Stiva w; ^ oop_3.cpp:38:11: error: expected ';' before 'w' Stiva w; ^ oop_3.cpp:46:13: error: 'w' was not declared in this scope w.Push(x); ^ oop_3.cpp:49:13: error: 'w' was not declared in this scope w.Pop(); ^ oop_3.cpp:51:21: error: 'w' was not declared in this scope fout << w.Top() << "\n"; ^ oop_3.cpp:53:21: error: 'w' was not declared in this scope fout << w.Max() << "\n"; ^ oop_3.cpp: In function 'int Top()': oop_3.cpp:18:5: warning: control reaches end of non-void function [-Wreturn-type] } ^ oop_3.cpp: In function 'int Empty()': oop_3.cpp:31:5: warning: control reaches end of non-void function [-Wreturn-type] } ^
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ă.