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

前端 未结 4 1651
醉梦人生
醉梦人生 2020-12-24 11:07

I have debug output in my program like this:

#define DEBUG
...
#ifdef DEBUG
    std::cout << \"[RE_words] \" << m_re << std::endl;
#endif
<         


        
4条回答
  •  太阳男子
    2020-12-24 12:10

    Yes, you should check project options page, Compile->Advanced compile options. However, VS by default automatically defines DEBUG directive for Debug mode.

提交回复
热议问题