ofstream是从内存到硬盘,ifstream是从硬盘到内存,其实所谓的流缓冲就是内存空间。 在C++中,对文件的操作是通过stream的子类fstream(file stream)来实现的,所以,要用这种方式操作文件,就必须加入头文件fstream.h。 fstream有两个子类:ifstrea Read More
posted @ 2022-03-09 08:16 Brickert Views(68) Comments(0) Diggs(0)