>classbasic_ofstream:publicstd::basic_ostream<CharT, Traits> 类模板basic_ofstream实现文件上基于流的高层输出操作。它将std::basic_ostream的高层接口赋予基于文件的流缓冲(std::basic_filebuf)。 std::basic_ofstream的典型实现只保有一个非派生成员:一个std::basic_filebuf<CharT, Traits>的实例。
包装给定的抽象设备(std::basic_streambuf) 并提供高层输入/输出接口 (类模板) 文件输入/输出实现 在标头<fstream>定义 basic_filebuf 实现原生文件设备 (类模板) basic_ifstream 实现高层文件流输入操作 (类模板) basic_ofstream 实现高层文件流输出操作 ...
<cpp |io |basic ofstream voidopen(constchar*filename, std::ios_base::openmodemode =std::ios_base::out); (1) voidopen(conststd::filesystem::path::value_type*filename, std::ios_base::openmodemode =std::ios_base::out); ...
basic_ofstream::is_open basic_ofstream::open basic_ofstream::close Non-member functions swap(std::basic_ofstream) (C++11) void close(); Closes the associated file. Effectively calls rdbuf()->close(). If an error occurs during operation, setstate(failbit) is called. Parameters (none) ...
voidswap(basic_ofstream<T>&lhs, basic_ofstream<T>&rhs); Spezialisiert diestd::swapAlgorithmus fürstd::basic_ofstream. Exchanges den Zustand derlhsmit derrhs. Effektiv nenntlhs.swap(rhs). Original: Specializes thestd::swapalgorithm forstd::basic_ofstream. Exchanges the state oflhswith that ...
ofstream Output file stream. Can be used to create write data to files. fstream File stream. Can be used to read and write data to/from files. ifstream and ofstream #include <fstream> // open an ifstream ifstream inputFile; inputFile.open("InputFile.txt"); // Alternatively: // ifstream...
Une implémentation typique de std::basic_ofstream ne contient qu'un seul non-membre de données dérivées: une instance de std::basic_filebuf<CharT, Traits> . Original: A typical implementation of std::basic_ofstream holds only one non-derived data member: an instance of std::basic_file...
> class basic_ofstream : public std::basic_ostream<CharT, Traits> Das Klassen-Template basic_ofstream implementiert High-Level-Output-Operationen auf dateibasierte Streams. Es lässt sich eine Datei-basierte streambuffer (std::basic_filebuf) mit dem High-Level-Schnittstelle (std::basic_ostream)...
std::pair<size_t, size_t> sztot; if(!outfile.empty()) { string file3 = outfile + ".3." + gEbwt_ext; string file4 = outfile + ".4." + gEbwt_ext; // Open output stream for the '.3.gEbwt_ext' file which will // hold the size records. ofstream fout3(file3.c_str()...
<fstream> std::basic_fstream, std::basic_ifstream, std::basic_ofstream class templates and several typedefs <sstream> std::basic_stringstream, std::basic_istringstream, std::basic_ostringstream class templates and several typedefs <strstream> std::strstream, std::istrstream, std::ostrstream(de...