我maknig宏格式.. [英] Im maknig macro format ..

查看:87
本文介绍了我maknig宏格式..的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我制作定义头文件。



格式化错误..

I make define header file.

The format make error..

#define LOG_FORMAT(id, level, logformat, ...) \
{\
    if (zsummer::log4z::ILog4zManager::GetInstance()->PrePushLog(id,level)) \
    {\
       if(zsummer::log4z::ILog4zManager::GetInstance()->GetChangeFileStatus()==1)\
       {\
         zsummer::log4z::ILog4zManager::GetInstance()->PushLog(id, level, "Title");\

        }\

        char logbuf[LOG4Z_LOG_BUF_SIZE];\
        int ret = _snprintf_s(logbuf, LOG4Z_LOG_BUF_SIZE, _TRUNCATE, logformat, ##__VA_ARGS__);\
        zsummer::log4z::ILog4zManager::GetInstance()->PushLog(id, level, logbuf);\

    }\
 }

推荐答案

请注意,您的宏不允许空行。它们还需要以反斜杠结束。否则他们会终止宏。



如果这不是明显的错误,请告诉我们您收到的确切错误消息。
Note that you are not allowed to have empty lines in your macro. They also need to be terminated with a backslash. Otherwise they terminate the macro.

If this is not the obvious error, please let us know the exact error messages you get.


这篇关于我maknig宏格式..的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆