fstream 是一个什么头文件,什么时候需要引用?c++

2024-12-16 03:51:53
推荐回答(3个)
回答1:


namespace std {
template >
class basic_filebuf;
typedef basic_filebuf filebuf;
typedef basic_filebuf wfilebuf;
template >
class basic_ifstream;
typedef basic_ifstream ifstream;
typedef basic_ifstream wifstream;
template >
class basic_ofstream;
typedef basic_ofstream ofstream;
typedef basic_ofstream wofstream;
template >
class basic_fstream;
typedef basic_fstream fstream;
typedef basic_fstream wfstream;
};
Include the iostreams standard header to define several template classes that support iostreams operations on sequences stored in external files.

回答2:

其实,你可以在开始全部引用,就可以随心所欲了。

回答3:

文件流处理的时候用