Borderou de evaluare (job #3184020)

Utilizator smunteanuMunteanu Stefan Catalin smunteanu Data 13 decembrie 2023 23:40:51
Problema Bacterii2 Status done
Runda Arhiva ICPC Compilator cpp-64 | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: main.cpp:8:3: error: 'ofstream' does not name a type 8 | ofstream fout; | ^~~~~~~~ main.cpp: In member function 'void OutputDevice::flush()': main.cpp:14:5: error: 'fout' was not declared in this scope 14 | fout.write(buffer, 1024); | ^~~~ main.cpp: In member function 'void OutputDevice::print(unsigned int)': main.cpp:23:20: error: '__detail' has not been declared 23 | unsigned len = __detail::__to_chars_len(x); | ^~~~~~~~ main.cpp:25:5: error: '__detail' has not been declared 25 | __detail::__to_chars_10_impl(intbuf, len, x); | ^~~~~~~~ main.cpp: In constructor 'OutputDevice::OutputDevice(const char*)': main.cpp:46:37: error: class 'OutputDevice' does not have any field named 'fout' 46 | OutputDevice(const char* fname) : fout(ofstream(fname)) {} | ^~~~ main.cpp:46:42: error: 'ofstream' was not declared in this scope; did you mean 'std::ofstream'? 46 | OutputDevice(const char* fname) : fout(ofstream(fname)) {} | ^~~~~~~~ | std::ofstream In file included from /usr/include/c++/12.2.1/ios:38, from /usr/include/c++/12.2.1/istream:38, from /usr/include/c++/12.2.1/sstream:38, from /usr/include/c++/12.2.1/complex:45, from /usr/include/c++/12.2.1/ccomplex:39, from /usr/include/c++/12.2.1/x86_64-pc-linux-gnu/bits/stdc++.h:54, from main.cpp:3: /usr/include/c++/12.2.1/iosfwd:165:41: note: 'std::ofstream' declared here 165 | typedef basic_ofstream<char> ofstream; | ^~~~~~~~ main.cpp: In destructor 'OutputDevice::~OutputDevice()': main.cpp:49:5: error: 'fout' was not declared in this scope 49 | fout.write(buffer, it - buffer); | ^~~~ Non zero exit status: 1

Ceva nu functioneaza?