#ifdef _DEBUG // do something #else // do something #endif 转载于:https://www.cnblogs.com/JohnShao/archive/2011/06/24/2089024.html