Borderou de evaluare (job #580033)
Utilizator |
|
IP | ascuns |
---|---|---|---|
Problemă | Zar (clasa a 8-a) | Compilator | cpp-32 |
Rundă | Arhiva de probleme | Status | evaluat |
Dată | 28 ian. 2021 11:38:47 | Scor | 0 |
Raport evaluator
Eroare de compilare:
main.cpp:3:14: warning: missing terminating " character
3 | ifstream cin("zar.in);
| ^
main.cpp:3:14: error: missing terminating " character
3 | ifstream cin("zar.in);
| ^~~~~~~~~
main.cpp:4:14: error: expected ',' or '...' before '(' token
4 | ofstream cout("zar.out");
| ^
main.cpp:4:25: error: expected ')' before ';' token
4 | ofstream cout("zar.out");
| ^
| )
main.cpp:3:13: note: to match this '('
3 | ifstream cin("zar.in);
| ^
main.cpp: In function 'int main()':
main.cpp:10:4: error: invalid operands of types 'std::ifstream(std::ofstream)' {aka 'std::basic_ifstream<char>(std::basic_ofstream<char>)'} and 'int' to binary 'operator>>'
10 | cin>>n>>poz1>>poz2;
| ~~~^~~
| | |
| | int
| std::ifstream(std::ofstream) {aka std::basic_ifstream<char>(std::basic_ofstream<char>)}
main.cpp:13:8: error: invalid operands of types 'std::ifstream(std::ofstream)' {aka 'std::basic_ifstream<char>(std::basic_ofstream<char>)'} and 'int' to binary 'operator>>'
13 | cin>>v[i];
| ~~~^~~~~~
| | |
| | int
| std::ifstream(std::ofstream) {aka std::basic_ifstream<char>(std::basic_ofstream<char>)}
main.cpp:16:4: error: invalid operands of types 'std::ifstream(std::ofstream)' {aka 'std::basic_ifstream<char>(std::basic_ofstream<char>)'} and 'int' to binary 'operator>>'
16 | cin>>k;
| ~~~^~~
| | |
| | int
| std::ifstream(std::ofstream) {aka std::basic_ifstream<char>(std::basic_ofstream<char>)}
main.cpp:18:10: error: invalid operands of types 'std::ifstream(std::ofstream)' {aka 'std::basic_ifstream<char>(std::basic_ofstream<char>)'} and 'char' to binary 'operator>>'
18 | while(cin>>ch)
| ~~~^~~~
| | |
| | char
| std::ifstream(std::ofstream) {aka std::basic_ifstream<char>(std::basic_ofstream<char>)}
main.cpp:65:1: error: 'cout' was not declared in this scope
65 | cout<<suma[i]<<" ";
| ^~~~
main.cpp:2:1: note: 'std::cout' is defined in header '<iostream>'; did you forget to '#include <iostream>'?
1 | #include <fstream>
+++ |+#include <iostream>
2 | using namespace std;
main.cpp:66:1: error: 'cout' was not declared in this scope
66 | cout<<endl;