文件的读写

#include<iostream>
#include<fstream>
using namespace std;
int main()
{

ifstream in("in.cpp");
ofstream out("out.cpp");
string s;
while(getline(in,s))
{
cout<<s<<"\n";
out<<s<<"\n";
}
return 0;
}

posted @ 2013-03-10 21:16  wiessharling  阅读(131)  评论(0编辑  收藏  举报