- /*
- *Copyright(c) 2016.烟台大学计算机与控制工程学院
- *ALL rights reserved.
- *文件名称:main.cpp
- *作者:孙超
- *问题描述:程序阅读 文件操作
- */
- #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;
- }