码迷,mamicode.com
首页 > 编程语言 > 详细

c++对文件操作的支持

时间:2014-10-30 16:42:25      阅读:149      评论:0      收藏:0      [点我收藏+]

标签:blog   io   os   ar   sp   文件   div   log   as   

#include <stdio.h>
#include <iostream>
#include <fstream>
using namespace std;
void main()
{       int a,b;
char c;
ofstream fout("test.txt");
fout<<" "<<0<<" "<<1<<" "<<4<<endl;
fout<<" "<<3<<" "<<4<<" "<<‘d‘<<endl;
ifstream fin("test.txt");
while (!fin.eof())
{
    fin>>a>>b>>c;
    cout<<a<<" "<<b<<" "<<c<<endl;
}
cin>>a;
}

  

c++对文件操作的支持

标签:blog   io   os   ar   sp   文件   div   log   as   

原文地址:http://www.cnblogs.com/lwngreat/p/4062918.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!