项目一
来源:互联网 发布:人员排班软件 编辑:程序博客网 时间:2024/05/22 11:33
#include <iostream>#include <cstdlib>#include <fstream>using namespace std;int main(){ fstream outfile,infile; infile.open("abc.txt",ios::in); // (1) if(!infile) { cout<<"Can’t open the file."<<endl; abort(); } outfile.open("newabc.txt",ios::out);//(2) if(!outfile) { cout<<"Can’t open the file."<<endl; abort(); } char buf[80]; int i=1; while(!infile.eof()) // (3) { infile.getline(buf,80); // (4) outfile<<i++f<<": "<<buf<<endl; //(5) } infile.close(); outfile.close(); return 0;}
0 0
- 项目一
- 项目一
- 项目一
- 项目一
- 项目一
- 项目一
- 项目一
- 项目一
- 项目一。
- 项目一。
- 项目一
- 项目一
- 项目一
- 项目一
- 项目一
- 项目一
- 项目一
- 项目一
- FragmentPagerAdapter与FragmentStatePagerAdapter区别
- 第十四周项目1--小玩文件(2)
- 第14周程序阅读 例3
- 第14周项目1-小玩文件(2)
- js选下拉框 提交 (触发事件)
- 项目一
- 第14周项目1 - 小玩文件(2)
- 139 金正國 思齋 聽辨不詳 (金安國 弟)
- 应用环境下的TIME_WAIT和CLOSE_WAIT处理
- 第十四周程序阅读例二
- Unity 中,FPS 第一人称行走,按A键,一直后退。WASD方向控制错误
- stm32.cube(一)——系统架构及目录结构
- 第14周程序阅读 例4.1
- 第十三周项目二 形状类族中的纯虚函数