Logo cxm1024 的博客

博客

超实用代码前缀

...
cxm1024
2025-12-01 12:52:17
wfyz 太有实力了

本文章由 WyOJ Shojo 从洛谷专栏拉取,原发布时间为 2020-02-22 13:08:07

#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 相同的效果,并输出这个变量当前的值(调试用)

评论

暂无评论

发表评论

可以用@mike来提到mike这个用户,mike会被高亮显示。如果你真的想打“@”这个字符,请用“@@”。