fork download
  1. #include <iostream>
  2. #include <stack>
  3. using namespace std;
  4.  
  5. int main() {
  6. Stack st=new Stack();
  7. st.push(1);
  8. st.push(3);
  9. st.push(4);
  10. st.push(6);
  11.  
  12. cout<<st.empty()<<endl;
  13.  
  14.  
  15.  
  16. st.pop();
  17. st.pop();
  18. st.pop();
  19.  
  20. st.pop();
  21. cout<<st.empty()<<endl;
  22.  
  23. }
  24. // your code goes here
  25. return 0;
  26. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp: In function ‘int main()’:
prog.cpp:5:3: error: ‘Stack’ was not declared in this scope
   Stack st=new Stack();
   ^~~~~
prog.cpp:6:9: error: ‘st’ was not declared in this scope
         st.push(1);
         ^~
prog.cpp: At global scope:
prog.cpp:24:2: error: expected unqualified-id before ‘return’
  return 0;
  ^~~~~~
prog.cpp:25:1: error: expected declaration before ‘}’ token
 }
 ^
stdout
Standard output is empty