Borderou de evaluare (job #724128)
Utilizator |
|
IP | ascuns |
---|---|---|---|
Problemă | Paranteze | Compilator | cpp-32 |
Rundă | Arhiva de probleme | Status | evaluat |
Dată | 16 iun. 2023 19:45:36 | Scor | 0 |
Raport evaluator
Eroare de compilare:
main.cpp: In function 'void paranteza(int, int)':
main.cpp:22:34: error: expected ')' before '}' token
22 | for(int i=1;i < depth;i++}
| ~ ^
| )
main.cpp:22:34: error: expected primary-expression before '}' token
main.cpp:24:13: error: 'couit' was not declared in this scope
24 | couit << v[i];
| ^~~~~
main.cpp:26:9: error: 'cout' was not declared in this scope
26 | cout << endl;
| ^~~~
main.cpp:12:1: note: 'std::cout' is defined in header '<iostream>'; did you forget to '#include <iostream>'?
11 | #include <vector>
+++ |+#include <iostream>
12 | using namespace std;
main.cpp:26:17: error: 'endl' was not declared in this scope
26 | cout << endl;
| ^~~~
main.cpp:12:1: note: 'std::endl' is defined in header '<ostream>'; did you forget to '#include <ostream>'?
11 | #include <vector>
+++ |+#include <ostream>
12 | using namespace std;
main.cpp: At global scope:
main.cpp:28:5: error: expected unqualified-id before 'if'
28 | if(2* k - depth > sum){
| ^~
main.cpp:32:5: error: expected unqualified-id before 'if'
32 | if(sum > 0){
| ^~
main.cpp:39:1: error: expected declaration before '}' token
39 | }
| ^
main.cpp: In function 'int main()':
main.cpp:45:17: error: 'n' was not declared in this scope
45 | scanf("%d",&n);
| ^
main.cpp:43:12: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result]
43 | freopen("partmult.in","r",stdin);
| ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
main.cpp:44:12: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result]
44 | freopen("partmult.out","w",stdout);
| ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~