filecopy.cpp~
来自「用robocup2d改编设计的2d球队。」· CPP~ 代码 · 共 41 行
CPP~
41 行
#include <iostream>#include <fstream>#define BUFFSIZE 512using namespace std;int main(int arg,char *args[]){ if(arg!=3) { cout<<"Command error!!"<<endl; exit(1); } else { ifstream fin(args[1]); if(!fin) { cout<<"open file error!!"<<endl; exit(1); } ofstream fout(args[2]); if(fout) { cout<<"file exist,overwrite(y/n)?"; char yn=' '; while(yn!='y'&&yn!='n') yn=getchar(); if(yn=='n')exit(0); } fin.unsetf(ios_base::skipws); char c;// fin>>c; while(fin>>c) { fout<<c;// fin>>c; } } return 1;}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?