/*
* Copyright (c) 2013, 烟台大学计算机学院
* All rights reserved.
* 文件名称:test.cpp
* 作 者:王心垚
* 完成日期:2013 年 6 月 14 日
* 版 本 号:v1.0
*/
#include<iostream>
#include<fstream>
using namespace std;
int main()
{
ifstream readFile;
ofstream writeFile;
char ch;
readFile.open("a.txt",ios::in);
writeFile.open("b.txt",ios::out);
while(readFile.get(ch))
writeFile.put(ch);
readFile.close();
writeFile.close();
cout<<"Finish!"<<endl;
return 0;
}
运行结果: