概述
CFile log_file;
int log_file_opened = 0;
void logMessage(const char * sMsg)
{
if(!log_file_opened)
{
log_file.Open("D:\tex.log", CFile::modeCreate|CFile::modeWrite);
log_file_opened = 1;
}
int len = strlen(sMsg);
log_file.Write(sMsg, len);
}
最后
以上就是甜美背包为你收集整理的C++通过CFile写本地日志文件的全部内容,希望文章能够帮你解决C++通过CFile写本地日志文件所遇到的程序开发问题。
如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复