Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如果构建作为调试或发布运行,我想检查 C++ 2010。有没有简单的方法来检查?
谢谢你。
VisualStudio 生成_DEBUG和NDEBUG作为define. 您可以在编译时检查它。
_DEBUG
NDEBUG
define
#ifdef _DEBUG // THE CODE IS COMPILING IN DEBUG MODE. #endif