第十六周--阅读程序
来源:互联网 发布:三生网络直销平台 编辑:程序博客网 时间:2024/04/28 14:49
问题及代码:
/*计算机与控制工程学院作者:马艳艳完成日期:2106/6/19输入描述:无;输出描述:finish*/#include <iostream>#include <fstream>#include<cstring>using namespace std;int main(){ ifstream readFile; ofstream writeFile; char ch[100]; readFile.open("a.txt", ios::in); writeFile.open("b.txt", ios::out); while (!readFile.eof()) { readFile.getline(ch,100,'\n'); writeFile.write(ch,strlen(ch)); writeFile.write("\n",1); } readFile.close(); writeFile.close(); cout << "Finish!" << endl; return 0;}
运行结果:
0 0
- 第十六周 阅读程序
- 第十六周阅读程序
- 第十六周阅读程序
- 第十六周 阅读程序
- 第十六周 程序阅读
- 第十六周 程序阅读
- 第十六周--阅读程序
- 第十六周--阅读程序
- 第十六周--阅读程序
- 第十六周 阅读程序
- 第十六周--阅读程序
- 第十六周--阅读程序
- 第十六周--阅读程序
- 第十六周--阅读程序
- 第十六周--阅读程序
- 第十六周--阅读程序
- 第十六周--阅读程序
- 第十六周阅读程序2
- Android Fragment 真正的完全解析(上)
- execel导出和下载
- HDU 3523 最小费用流或KM
- BOS项目练习(流程定义/实例管理,bos用户角色同步activiti用户表组表)
- dumpbin丢失mspdb 问题
- 第十六周--阅读程序
- 给TextView设置图片的两种实现方法
- UVa 11300 Spreading the Wealth (线性方程组约束下的最优化问题)
- android权限相关的知识
- 数据库连接池
- Sqlite 导出表结构和数据
- 微信授权登录基本流程(网站应用)
- navicat for oracle连接oracle
- WDCP管理面板安装启动EXIF、bcmath完整步骤