Automatic #defines according to Debug/Release config in Visual Studio

The Visual Studio automatically defines _DEBUG symbol for Debug builds (and NDEBUG for non-debug builds).

Another way to do this is to go to the project settings -> configuration properties -> C/C++ -> preprocessor, and edit the preprocessor definitions manually.

See also:
This answer explains the differences between _DEBUG and NDEBUG in more detail.
This answer explains the purpose of the NDEBUG symbol and whether or not is it defined by the standard.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)