Borderou de evaluare (job #3292781)

Utilizator cristia_razvanCristia Razvan cristia_razvan Data 9 aprilie 2025 12:43:12
Problema Evaluarea unei expresii Status done
Runda Arhiva educationala Compilator cpp-64 | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: main.cpp:10:1: error: 'stack' does not name a type; did you mean 'obstack'? 10 | stack<char> ops; | ^~~~~ | obstack main.cpp:12:1: error: 'stack' does not name a type; did you mean 'obstack'? 12 | stack<int> nr; | ^~~~~ | obstack main.cpp: In function 'void calc(char)': main.cpp:23:14: error: 'nr' was not declared in this scope; did you mean 'dr'? 23 | int dr = nr.top(); | ^~ | dr main.cpp: In function 'int main()': main.cpp:39:23: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare] 39 | for (int i = 0; i < s.size(); i++) { | ~~^~~~~~~~~~ main.cpp:42:13: error: 'ops' was not declared in this scope 42 | ops.push('('); | ^~~ main.cpp:44:20: error: 'ops' was not declared in this scope 44 | while (ops.top() != '(') { | ^~~ main.cpp:47:13: error: 'ops' was not declared in this scope 47 | ops.pop(); | ^~~ main.cpp:49:21: error: 'ops' was not declared in this scope 49 | while (!ops.empty() && pri(ops.top()) >= pri(s[i])) { | ^~~ main.cpp:52:13: error: 'ops' was not declared in this scope 52 | ops.push(s[i]); | ^~~ main.cpp:60:13: error: 'ops' was not declared in this scope 60 | while (!ops.empty()) { | ^~~ main.cpp:65:13: error: 'nr' was not declared in this scope 65 | fout << nr.top() << "\n"; | ^~ Non zero exit status: 1

Ceva nu functioneaza?