MFC 文件按行读写 CStdioFile

//写文件

CStdioFile file;
file.Open("test.txt",CFile::modeCreate|CFile::modeReadWrite);
file.WriteString("A ha, hello!");

//读取abc.txt
CStdioFile file;
file.Open("abc.txt",CFile::modeRead);
CStringArray data;
CString line;
while (file.ReadString(line))
{
data.Add(line);
}

上一篇:MFC文件IO和串行化


下一篇:[转载]使用uiautomator做UI测试