Borderou de evaluare (job #617751)
Utilizator |
|
IP | ascuns |
---|---|---|---|
Problemă | Căutare binară | Compilator | cpp-32 |
Rundă | Arhiva de probleme | Status | evaluat |
Dată | 24 nov. 2021 12:10:01 | Scor | 0 |
Raport evaluator
Eroare de compilare:
main.cpp:6:1: error: 'ifstream' does not name a type
6 | ifstream in("cautbin.in");
| ^~~~~~~~
main.cpp:7:1: error: 'ofstream' does not name a type
7 | ofstream out("cautbin.out");
| ^~~~~~~~
main.cpp: In function 'int bsearch1(int, int, int)':
main.cpp:28:12: warning: unused variable 'n' [-Wunused-variable]
28 | int m, n = u;
| ^
main.cpp: In function 'int main()':
main.cpp:66:5: error: 'cin' was not declared in this scope
66 | cin>>n;
| ^~~
main.cpp:76:11: error: 'in' was not declared in this scope; did you mean 'n'?
76 | in>>tip>>val;
| ^~
| n
main.cpp:79:14: error: 'cout' was not declared in this scope
79 | cout<<bsearch0(1,n,val);
| ^~~~
main.cpp:82:14: error: 'cout' was not declared in this scope
82 | cout<<bsearch1(1,n,val);
| ^~~~
main.cpp:85:14: error: 'cout' was not declared in this scope
85 | cout<<bsearch2(1,n,val);
| ^~~~
main.cpp:64:12: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result]
64 | freopen("cautbin.in","r",stdin);
| ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
main.cpp:65:12: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result]
65 | freopen("cautbin.out","w",stdout);
| ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~