发明这个一定有用处,只是还没想到
#include <iostream>
#include<bitset>
using namespace std;
void print(){}; //1.这个一定要写
template <typename T,typename... Types>
void print(const T& firstArg,const Types&...Args)
{
cout << "参数数量:" <<sizeof...(Args) << endl; //连sizeof都有sizeof...()这种操作方式,fucku!
cout << firstArg << endl;
print(Args...);//不写1,找不到函数
}
int main()
{
print(1,2.0,'a',"hello world",bitset<24>(365));
return 0;
}