摘要: C++文件操作。C++中引入了stream,相关的头文件<fstream>,支持文件输入与输出,还有两个<ifstream>和<ofstream>,分别支持文件读入和写入。文件的打开与关闭fstream作为一种对象,它的操作由构造函数,成员函数来完成。fstream ( ); explicit fstream ( const char * filename, ios_base :openmode mode = ios_base::in | ios_base::out ); fstream f("input.txt",fstream::in 阅读全文
posted @ 2012-04-17 19:31 Frandy.CH 阅读(829) 评论(0) 推荐(0) 编辑