背过背过!每次敲代码先敲一个这个!(看了一下yjc神犇的代码发现的QAQ)

template<class T>void err(const T &x,const char c='\n') {cerr<<x<<c;}
template<class T,class ...Args>void err(const T &x,const Args &...args) {err(x,' '),err(args...);}

使用方法:

#include<bits/stdc++.h>
using namespace std;
template<class T>void err(const T &x,const char c='\n') {cerr<<x<<c;}
template<class T,class ...Args>void err(const T &x,const Args &...args) {err(x,' '),err(args...);}
int main(){
    int a=1,b=2,c=3,d=4;
    err(a,b,c,d);
	err(a,b,c,d);
    return 0;
}

输出:

1 2 3 4
1 2 3 4

关于语法相关,可以看一哈这个,虽然没啥子用

z7z永远滴神!
printf("%d\n",__LINE__);
__LINE__是一个宏,它在第x行就会被编译成x。这样它就可以输出当前程序运行到了第几行。。