Borderou de evaluare (job #2769273)

Utilizator victorgoreanuGoreanu Victor victorgoreanu Data 14 august 2021 14:12:36
Problema Cautare binara Status done
Runda Arhiva educationala Compilator cpp-64 | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: main.cpp:7:14: error: conflicting declaration 'std::vector<int> out' vector <int> out; ^~~ main.cpp:3:69: note: previous declaration as 'std::ofstream out' string __fname = "cautbin"; ifstream in (__fname + ".in"); ofstream out (__fname + ".out"); ^~~ main.cpp: In function 'int main()': main.cpp:75:17: error: 'std::ofstream {aka class std::basic_ofstream<char>}' has no member named 'push_back' out.push_back(z); ^~~~~~~~~ main.cpp:79:17: error: 'std::ofstream {aka class std::basic_ofstream<char>}' has no member named 'push_back' out.push_back(z); ^~~~~~~~~ main.cpp:83:17: error: 'std::ofstream {aka class std::basic_ofstream<char>}' has no member named 'push_back' out.push_back(z); ^~~~~~~~~ main.cpp:86:29: error: 'std::ofstream {aka class std::basic_ofstream<char>}' has no member named 'size'; did you mean 'tie'? for (int i = 0; i < out.size(); i++){ ^~~~ main.cpp:87:20: error: no match for 'operator[]' (operand types are 'std::ofstream {aka std::basic_ofstream<char>}' and 'int') cout << out[i] << endl; ^ Non zero exit status: 1

Ceva nu functioneaza?