比如创建a.txt
CFile file("a.txt",CFile::modeCreate|CFile::modeWrite|CFile::typeBinary);
CString str="abc"+'\n'+"123";
file.Write(str,str.GetLength());
file.Close();为什么在a.txt中并无换行,而是在一行内显示?
但16进制中又存在0x0d,是不是创建方法中的CFile::typeBinary不应该使用?
CFile file("a.txt",CFile::modeCreate|CFile::modeWrite|CFile::typeBinary);
CString str="abc"+'\n'+"123";
file.Write(str,str.GetLength());
file.Close();为什么在a.txt中并无换行,而是在一行内显示?
但16进制中又存在0x0d,是不是创建方法中的CFile::typeBinary不应该使用?
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货