摘要: 文件流里面:fstream表示文件流,ifstream和ofstream是两种文件流方式:输入和输出ifstream从磁盘文件输入到缓存中,最后到显示屏上,即读数据。ofstream将数据写入到磁盘文件,即写数据,下面这个例子很好的体现了这个方法: #include<iostream>#include<fstream>#include<iomanip>#include<string>using namespace std;int main(){ ofstream file1("D:\\1234.txt",ios::app);/ 阅读全文
posted @ 2012-02-07 00:26 RINA 阅读(536) 评论(0) 推荐(0) 编辑