C ++ VS2010 determines whether Release or Debug

I want to check in C ++ 2010 if the build works like Debug or Release. Is there an easy way to check this?

Thanks.

+6
source share
1 answer

VisualStudio generates _DEBUG and NDEBUG as define . You can check it at compile time.

 #ifdef _DEBUG // THE CODE IS COMPILING IN DEBUG MODE. #endif 
+14
source

All Articles