Borderou de evaluare (job #746764)

Utilizator avatar Casian Casian Teodorescu Casian IP ascuns
Problemă Paranteze 1 (clasa a 6-a) Compilator cpp-32
Rundă Arhiva de probleme Status evaluat
Dată 22 nov. 2023 14:11:40 Scor 0

Raport evaluator

Eroare de compilare: main.cpp: In function 'int main()': main.cpp:22:22: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'unsigned int'} [-Wsign-compare] 22 | for(int j=0;j<s.size()&&!f;j++) | ~^~~~~~~~~ main.cpp:30:51: warning: suggest parentheses around '&&' within '||' [-Wparentheses] 30 | else if(!ch.empty() && (ch.top()=='(' && s[j]==')' || ch.top()=='{' && s[j]=='}')) | ~~~~~~~~~~~~~~^~~~~~~~~~~~ main.cpp:45:12: warning: init-statement in selection statements only available with '-std=c++17' or '-std=gnu++17' [-Wc++17-extensions] 45 | if(!ch.empty() || cnt!=0 | ^ main.cpp:45:40: error: expected ';' before 'extern' 45 | if(!ch.empty() || cnt!=0 | ^ | ; In file included from /usr/include/features.h:491, from /usr/lib/gcc/i686-pc-linux-gnu/13/include/g++-v13/i686-pc-linux-gnu/bits/os_defines.h:39, from /usr/lib/gcc/i686-pc-linux-gnu/13/include/g++-v13/i686-pc-linux-gnu/bits/c++config.h:679, from /usr/lib/gcc/i686-pc-linux-gnu/13/include/g++-v13/cassert:43, from /usr/lib/gcc/i686-pc-linux-gnu/13/include/g++-v13/i686-pc-linux-gnu/bits/stdc++.h:33, from main.cpp:10: /usr/include/assert.h:64:1: error: 'extern' invalid in condition 64 | __BEGIN_DECLS | ^~~~~~~~~~~~~ /usr/include/assert.h:64:1: error: expected unqualified-id before string constant 64 | __BEGIN_DECLS | ^~~~~~~~~~~~~ main.cpp:56:20: error: expected ')' before ';' token 56 | using namespace std; | ^ | ) main.cpp:45:11: note: to match this '(' 45 | if(!ch.empty() || cnt!=0 | ^ main.cpp:58:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse] 58 | int main() | ^~ main.cpp:58:9: note: remove parentheses to default-initialize a variable 58 | int main() | ^~ | -- main.cpp:58:9: note: or replace parentheses with braces to value-initialize a variable main.cpp:59:1: error: a function-definition is not allowed here before '{' token 59 | { | ^ main.cpp:94:2: error: expected primary-expression before ')' token 94 | }) | ^ main.cpp:96:9: error: 'else' without a previous 'if' 96 | else | ^~~~