Borderou de evaluare (job #2847678)
Utilizator | Data | 11 februarie 2022 11:22:16 | |
---|---|---|---|
Problema | Cautare binara | Status | done |
Runda | Arhiva educationala | Compilator | cpp-64 | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
main.cpp:3:1: error: 'ifstream' does not name a type
3 | ifstream cin ("cautbin.in");
| ^~~~~~~~
main.cpp:4:1: error: 'ofstream' does not name a type
4 | ofstream cout ("cautbin.out");
| ^~~~~~~~
main.cpp: In function 'int main()':
main.cpp:13:5: error: 'cin' was not declared in this scope
13 | cin >> n;
| ^~~
main.cpp:2:1: note: 'std::cin' is defined in header '<iostream>'; did you forget to '#include <iostream>'?
1 | #include <fstream>
+++ |+#include <iostream>
2 |
main.cpp:41:30: error: 'cout' was not declared in this scope
41 | if (a[rez] == x) cout << rez << '\n';
| ^~~~
main.cpp:41:30: note: 'std::cout' is defined in header '<iostream>'; did you forget to '#include <iostream>'?
main.cpp:42:18: error: 'cout' was not declared in this scope
42 | else cout << -1 << '\n';
| ^~~~
main.cpp:42:18: note: 'std::cout' is defined in header '<iostream>'; did you forget to '#include <iostream>'?
main.cpp:51:13: error: 'cout' was not declared in this scope
51 | cout << rez << '\n';
| ^~~~
main.cpp:51:13: note: 'std::cout' is defined in header '<iostream>'; did you forget to '#include <iostream>'?
main.cpp:60:13: error: 'cout' was not declared in this scope
60 | cout << rez + 1 << '\n';
| ^~~~
main.cpp:60:13: note: 'std::cout' is defined in header '<iostream>'; did you forget to '#include <iostream>'?
Non zero exit status: 1
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !