Borderou de evaluare (job #2330747)

Utilizator natalia00Natalia Plesca natalia00 Data 28 ianuarie 2019 20:03:38
Problema Cautare binara Status done
Runda Arhiva educationala Compilator cpp-64 | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: main.cpp:1:1: error: 'include' does not name a type include<fstream> ^~~~~~~ main.cpp:4:1: error: 'ofstream' does not name a type ofstream g("cautbin.out"); ^~~~~~~~ main.cpp: In function 'void raspunde(int, int)': main.cpp:28:22: error: 'g' was not declared in this scope case 0: if(r>0) g<<r+1<<'\n'; ^ main.cpp:29:13: error: 'g' was not declared in this scope else g<<r<<'\n';break; ^ main.cpp:29:8: warning: this 'else' clause does not guard... [-Wmisleading-indentation] else g<<r<<'\n';break; ^~~~ main.cpp:29:24: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the 'else' else g<<r<<'\n';break; ^~~~~ main.cpp:30:14: error: 'g' was not declared in this scope case 1: g<<k+1<<'\n';break; ^ main.cpp: In function 'int main()': main.cpp:37:3: error: 'ifstream' was not declared in this scope ifstream f("cautbin.in"); ^~~~~~~~ main.cpp:38:3: error: 'f' was not declared in this scope f>>n; ^ main.cpp:47:3: error: 'g' was not declared in this scope g.close(); ^ Non zero exit status: 1

Ceva nu functioneaza?