filetest.cpp
来自「vc 编写的源代码!建议你们可以下载小看一下!」· C++ 代码 · 共 51 行
CPP
51 行
// 这是使用应用程序向导生成的 VC++
// 应用程序项目的主项目文件。
#include "stdafx.h"
#using <mscorlib.dll>
#include <tchar.h>
#include "stdio.h"
using namespace System;
// 这是此应用程序的入口点
int _tmain(void)
{
// TODO: 请用您自己的代码替换下面的示例代码。
FILE * pIn;
FILE * pOut;
char InFileName[20];
char OutFileName[20];
printf("please input the inName:\n");
scanf("%s",InFileName);
printf("please input the outName:\n");
scanf("%s",OutFileName);
if((pIn = fopen(InFileName,"rb"))==NULL)
{
printf("error of opening the Infile");
// exit(0);
}
if((pOut = fopen(OutFileName,"wb"))==NULL)
{
printf("error of opening the outfile");
fgetchar();
}
else
{
while(!feof(pIn))
{
char ch = fgetc(pIn);
fputc(ch,pOut);
}
fclose(pIn);
fclose(pOut);
}
return 0;
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?