请教DX,CStdioFile wrfile如何在一个文件的末尾开始写 wrfile.Open(strFileSave,CFile::modeRead|CFile::modeWrite|CFile::modeCreate);wrfile.WriteString("aaa");偶想在文件的末尾接着写,不知该添什么语句wrfile.SeekToEnd();用这个句子也不行 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 BOOL CreateLogFile(char *strInfo,char *strFileName){ if (lstrlen(strInfo)<1) return FALSE; CFile file; file.Open(strFileName,CFile::modeCreate|CFile::modeReadWrite|CFile::modeNoTruncate); file.SeekToEnd(); CString temp; char *pStrInfo; temp=strInfo; temp=temp+"\r\n"; pStrInfo=temp.GetBuffer(temp.GetLength()); file.Write(pStrInfo,::lstrlen(pStrInfo)); file.Close(); return TRUE;} SeekToEnd搜索到文件末尾,可以的 MFC窗口消息 richedit 控件如何显示指定字符串 如何使用Microsoft H.261 Video Codec来压缩位图? 请教大虾 vc中variant_t怎样转换成字符串型的值? 从上周起我就没办法用“收藏”,大版主帮帮我!! 请推荐几本VC的书,UP有分 苦闷!如何在vc中动态链接做成dll的类? 一个不是基于MFC的程序,如何实现网络连接? 使用ado控件时,如何才能用列名来取得列值? 请高手指点:为什么我的client--server程序只能传送26K以下的文件? 开发环境出问题了,VC.net2003 OpenProcess的使用
{
if (lstrlen(strInfo)<1)
return FALSE;
CFile file;
file.Open(strFileName,CFile::modeCreate|CFile::modeReadWrite|CFile::modeNoTruncate);
file.SeekToEnd();
CString temp;
char *pStrInfo;
temp=strInfo;
temp=temp+"\r\n";
pStrInfo=temp.GetBuffer(temp.GetLength());
file.Write(pStrInfo,::lstrlen(pStrInfo));
file.Close();
return TRUE;
}