The use of macros with fewer but particularly useful with the method

 

__VA_ARGS__ 

 Declare variable parameters:

 

#define OUTPUTDEBUGINFO

#ifdef OUTPUTDEBUGINFO    
#define  OUTPUT(X,...) {CString _str(_T("")); _str.Format(X,__VA_ARGS__); _str=_T("\n")+_str; OutputDebugString(_str);}
#else
#define  OUTPUT(X)
#endif 

 

defined

Testing whether the macro is defined to declare the plurality of determination conditions in a determination statement:

 

#if defined(VAX) && defined(UNIX) && !defined(DEBUG)

 

 

 

 

Guess you like

Origin www.cnblogs.com/ice-arrow/p/11684497.html