摘要:
C++中的文件流有三种:ifstream - 由istream派生而来,提供读文件的功能ofstream - 由ostream派生而来,提供写文件的功能fstream - 由iostream派生而来,提供读写同一个文件的功能先说ifstream文件流,对文件进行读操作。从文件中读取内容有多种方式. 一行一行地读:使用string结构; 1 ifstream fin(filename.c_str(), ifstream::in | ifstream::binary); 2 if (fin == NULL) 3 { 4 ... 阅读全文
posted @ 2012-03-01 19:42
拼装小火车
阅读(7432)
评论(0)
推荐(3)
浙公网安备 33010602011771号