#include <iostream> #include<vector> //#define MY_DEBUG //需要debug时去掉注释 using namespace std; int main() { cout << "no debug\n"; vector<int> vec = {1,2,3,4,5,6,7,8,9,10}; #ifdef MY_DEBUG cout << "in debug\n"; for(auto a : vec){ cout << a << endl; } #endif // MY_DEBUG return 0; }