Problem lvm
User Dolphy
Submission Time 2023-11-20 15:03:04
Score 0
Max Time N/A
Max Memory N/A

Compile Error

lvm.cpp: In function ‘int main()’:
lvm.cpp:6:2: error: ‘stack’ was not declared in this scope
6 | stack <int> lvm, store;
| ^~~~~
lvm.cpp:2:1: note: ‘std::stack’ is defined in header ‘<stack>’; did you forget to ‘#include <stack>’?
1 | #include <iostream>
+++ |+#include <stack>
2 | using namespace std;
lvm.cpp:6:9: error: expected primary-expression before ‘int’
6 | stack <int> lvm, store;
| ^~~
lvm.cpp:11:14: error: comparison between distinct pointer types ‘std::string*’ {aka ‘std::__cxx11::basic_string<char>*’} and ‘const char*’ lacks a cast [-fpermissive]
11 | if (input=="PUSH") {
| ^~~~~~
lvm.cpp:13:7: error: ‘lvm’ was not declared in this scope
13 | lvm.push(num);
| ^~~
lvm.cpp:15:14: error: comparison between distinct pointer types ‘std::string*’ {aka ‘std::__cxx11::basic_string<char>*’} and ‘cons