원문 출처 : http://msdn.microsoft.com/en-us/library/b0084kay.aspx

Predefined Macro 가 참 많은데, 몇가지 자주 쓰는 것만 정리해봅니다.



_MSC_VER

Evaluates to the major and minor number components of the compiler's version number. The major number is the first component of the period-delimited version number and the minor number is the second component.

For example, if the version number of the Visual C++ compiler is 15.00.20706.01, the _MSC_VER macro evaluates to 1500.

In Visual Studio 2010, _MSC_VER is defined as 1600.



_DEBUG

Defined when you compile with /LDd, /MDd, and /MTd. 



__FUNCTION__ / __FUNCTIONW__

Valid only in a function. Defines the undecorated name of the enclosing function as a string.

__FUNCTION__ is not expanded if you use the /EP or /P compiler option.

See __FUNCDNAME__ for an example. 

+ Recent posts