Submisie


Utilizator
Problema
Data
Compilator
Scor
14 Ianuarie 2025, 13:12
c++14
E.C.

fail

Mesaj compilare

        main.cpp: In function ‘int main()’:
main.cpp:15:5: error: ‘stack’ was not declared in this scope
   15 |     stack <char> p;
      |     ^~~~~
main.cpp:9:1: note: ‘std::stack’ is defined in header ‘<stack>’; did you forget to ‘#include <stack>’?
    8 | #include <iostream>
  +++ |+#include <stack>
    9 | using namespace std;
main.cpp:15:12: error: expected primary-expression before ‘char’
   15 |     stack <char> p;
      |            ^~~~
main.cpp:19:22: error: ‘p’ was not declared in this scope
   19 |         if(s[i]=='m')p.push('+');
      |                      ^
main.cpp:20:22: error: ‘p’ was not declared in this scope
   20 |         if(s[i]=='b')p.push('-');
      |                      ^
main.cpp:21:22: error: ‘p’ was not declared in this scope
   21 |         if(s[i]=='l')p.push('*');
      |                      ^
main.cpp:22:22: error: ‘p’ was not declared in this scope
   22 |         if(s[i]=='v')p.push('/');
      |                      ^
main.cpp:24:28: error: ‘p’ was not declared in this scope
   24 |         if(s[i]==',')cout<<p.top();
      |                            ^
main.cpp:25:22: error: ‘p’ was not declared in this scope
   25 |         if(s[i]==')')p.pop();
      |                      ^