超实用代码前缀
cxm1024
·
·
个人记录
#include<iostream>
#include<algorithm>
#include<cstdio>
#include<cstdlib>
#include<cmath>
#include<cstring>
#include<string>
#include<set>
#include<map>
#include<vector>
#include<queue>
#include<deque>
#include<utility>
#define DEBUG fprintf(stderr, "Passing function [%s] line %d\n", __FUNCTION__,__LINE__);
#define DE(sss) fprintf(stderr, "Passing function [%s] line %d %s=", __FUNCTION__,__LINE__,#sss);cout<<sss<<endl;
using namespace std;
int main()
{
return 0;
}
- 在某一行输入
DEBUG(不用加分号),运行到那儿会输出当前所在函数和 DEBUG 所在的行号(调试用)
- 在某一行输入
DE(···)(括号里是任意变量名)(不用加分号),运行到那儿不仅会有和 DEBUG 相同的效果,并输出这个变量当前的值(调试用)