Borderou de evaluare (job #746765)
Utilizator |
|
IP | ascuns |
---|---|---|---|
Problemă | Paranteze 1 (clasa a 6-a) | Compilator | cpp-32 |
Rundă | Arhiva de probleme | Status | evaluat |
Dată | 22 nov. 2023 14:14:03 | Scor | 0 |
Raport evaluator
Eroare de compilare:
main.cpp: In function 'int main()':
main.cpp:14:22: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'unsigned int'} [-Wsign-compare]
14 | for(int j=0;j<s.size()&&!f;j++)
| ~^~~~~~~~~
main.cpp:22:51: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
22 | else if(!ch.empty() && (ch.top()=='(' && s[j]==')' || ch.top()=='[' && s[j]==']' || ch.top()=='{' && s[j]=='}'))
| ~~~~~~~~~~~~~~^~~~~~~~~~~~
main.cpp:22:112: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
22 | else if(!ch.empty() && (ch.top()=='(' && s[j]==')' || ch.top()=='[' && s[j]==']' || ch.top()=='{' && s[j]=='}'))
| ~~~~~~~~~~~~~~^~~~~~~~~~~~
main.cpp: At global scope:
main.cpp:42:2: error: expected unqualified-id before ')' token
42 | })
| ^
main.cpp:44:9: error: expected unqualified-id before 'else'
44 | else
| ^~~~
main.cpp:46:5: error: expected unqualified-id before 'return'
46 | return 0;
| ^~~~~~
main.cpp:47:1: error: expected declaration before '}' token
47 | }
| ^