#define trace(...) doesn't work c++
i have following preprocessor divective:
#ifndef ndebug
#define snippet printf
#else
#define trace(...)
#endif
and instance use is:
trace("trace: parameter = %i\n", param);
in c works ideally good i build both debug redeem versions, nonetheless c++ compiler emits following:
warning: unfair impression macro parameter name
error: badly punctuated parameter list `#define'
and points warning blunder 'trace(...)' directive.
how c++ correctly?
Comments
Post a Comment