FILE* pFile = fopen("1.txt","w");
fwrite("http://www.886997.com",1,strlen(http://www.886997.com),pFile);
fseek(pFile,0,SEEK_SET); //从文件的开始处覆盖写入
char cStr[100];
memset(cStr,0,sizeof(cStr));
fread(cStr,1,100,pFile);
char *pBuf;
fseek(pFile,0,SEEK_END);
int leng = ftell(pFile);
pBuf = new char[len+1];
rewind(pFile); //将指针移动到开头
fread(pBuf,1,len,pFile);
pBuf[len] = 0;
fclose(pFile);
CFile file("1.txt",CFile::modeCreate | CFile::modeWrite);
file.Write("sdfdfsd",strlen("sdfdfsd",)
char* pBuf;
DWORD dwLength;
dwLength = file.GetLength();
pBuf = new char[dwLength+1];
pBuf[dwLength]=0;
file.Read(pBuf,dwLength);
file.Close();
//读写INI文件
::WriteProfileString("key","keyName","keyValue");
CString str;
::GetProfileString("key","admin","lisi",str.GetBuffer(100),100);