test.cpp

来自「读取两个文本文件」· C++ 代码 · 共 24 行

CPP
24
字号
//#include <stdio.h>
//#include <string.h>
/*void main()
{
	FILE *pFile=fopen("GsProtocol.txt","r");
	FILE *pFile1=fopen("1.txt","w");
	char *File;
	//fwrite("http://www.sunxin.org",1,strlen("http://www.sunxin.org"),pFile);
	fseek(pFile,0,SEEK_END);
	int len=ftell(pFile);
	//printf("the length:%d",len);//222349
	File=new char[len+1];
	memset(File,0,len+1);
	//fseek(pFile,0,SEEK_SET);
	rewind(pFile);
	//printf("the buffer:%d",strlen(File));//0
	len=fread(File,1,len,pFile);
	//printf("the length:%d",len);//218871
    fclose(pFile);
	//printf("the buffer:%d",strlen(File));//221184
	fwrite(File,1,len,pFile1);//这里的len是重复读取的原因
	fclose(pFile1);
}*/

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?