- 区分Release与Debug
#include <iostream>
#ifdef NDEBUG
std::cout << "Release" << std::endl;
#else
std::cout << "Debug" << std::endl;
#endif
判断是否为debug模式
//--------------------
#ifdef _DEBUG
std::cout << "Debug " << std::endl;
#endif
判断是否为linux下
#ifdef __linux__
std::cout << "Linux" << std::endl;
#endif