CFile m_File;
m_File.Open(A);
m_File.Seek()
m_File.Read(A);
m_File.Close(A);
m_File.Open(B);
m_File.Seek()
m_File.Write(B);
m_File.Close(B);
参数自己参考msdn.
CStdioFile file;
if(file.Open(filename1,CFile::modeRead))
{
int numarray=0;
CString str;BOOL b=FALSE;
do
{
b=file.ReadString(str);
filearray.SetAtGrow(numarray,str);
numarray++;
}while(b);
file.Close();
}
CStdioFile file;
file.Open(filename2,CFile::modeWrite|CFile::modeCreate);
for(int i=0;i
CString zx=filearray.GetAt(i);
LPCTSTR lpctstr=zx.GetBuffer(1+zx.GetLength());
file.WriteString(lpctstr);
}
file.Close();