CString a[3]= { "1.qqqq","2.wwwwwwww","3.eeeeee"};
for(int i=0;i<3;i++)
{
CStdioFile hTxtFile;
hTxtFile.Open("c:\\tishi.ini",CFile::modeWrite|CFile::modeCreate);
hTxtFile.SeekToEnd();
hTxtFile.WriteString(a[i]);
hTxtFile.WriteString("\r\n");
hTxtFile.Close();
}
为什么在tishi.ini文件中只有3.eeeeee?
for(int i=0;i<3;i++)
{
CStdioFile hTxtFile;
hTxtFile.Open("c:\\tishi.ini",CFile::modeWrite|CFile::modeCreate);
hTxtFile.SeekToEnd();
hTxtFile.WriteString(a[i]);
hTxtFile.WriteString("\r\n");
hTxtFile.Close();
}
为什么在tishi.ini文件中只有3.eeeeee?
hTxtFile.Open("c:\\tishi.ini",CFile::modeWrite ¦CFile::modeCreate);
hTxtFile.SeekToEnd();
for(int i=0;i <3;i++)
{
hTxtFile.WriteString(a[i]);
hTxtFile.WriteString("\r\n");
}hTxtFile.Close();