第16周程序阅读(2)
来源:互联网 发布:sublime mac 卡住 编辑:程序博客网 时间:2024/05/21 19:39
#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;}
运行结果
这个程序的意思是把a文件里的字符全部复制到b文件了,最后输出finish。
0 0
- 第16周-阅读程序(2)
- 第16周阅读程序(2)
- 第16周 程序阅读(2)
- 第16周 阅读程序 ( 2)
- 第16周程序阅读(2)
- 第16周-阅读程序(1)
- 第16周阅读程序(1)
- 第16周阅读程序(3)
- 第16周-阅读程序(3)
- 第16周 阅读程序 (1)
- 第16周程序阅读(1)
- 第16周程序阅读(3)
- 第16周 程序阅读(4)
- 第16周程序阅读(5)
- 第16周程序阅读(6)
- 第16周程序阅读(7)
- 第16周程序阅读(8)
- 第16周程序阅读(9)
- Python中::(双冒号)的用法
- Makefile
- Java 连接Oracle 报错: java.sql.SQLException: ORA-28040: No matching authentication protocol
- HDU 1983 Kaitou Kid - The Phantom Thief (2)(DFS+BFS)
- android更改状态栏颜色
- 第16周程序阅读(2)
- 1009 ProblemI
- python学习第一章(数字,字符串,列表等)
- iOS项目-----主题APP
- logcat抓取日志
- android 之GridLayout浅谈
- office密码破解软件AOPR怎么汉化
- Java 基础知识
- Android安全开发之ZIP文件目录遍历