功能:
将a中字符复制到b中去
复制代码
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29/*Copyright (c) 2016,烟台大学计算机学院 *All rights reserved. *文件名称 : *作 者 : 李钊 *完成日期 : 2016年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; }
运行结果:
最后
以上就是悦耳篮球最近收集整理的关于第十六周阅读程序2的全部内容,更多相关第十六周阅读程序2内容请搜索靠谱客的其他文章。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复