我是靠谱客的博主 甜美背包,这篇文章主要介绍C++通过CFile写本地日志文件,现在分享给大家,希望可以做个参考。

    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写本地日志文件内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(46)

评论列表共有 0 条评论

立即
投稿
返回
顶部