相信CSDN的开发者们在写某些小游戏的时候总会遇到一些难题,比如——
想要延迟,Sleep(xxx),可是必须要 #include <ctime> 的头文件才行,怎么办?
要 #include <ctime> 的头文件,必须要输入 #include <windows.h> 才行。
那我的头文件岂不是越来越多了?
下面,我将带领大家看一个C++的万能头文件!
有了它,什么头文件都不用敲了!
它就是——
#include <bits/stdc++.h>
啊!看到自己的代码如此整洁,是不是很兴奋呢?
相对于平常的......
#include <algorithm>
#include <bitset>
#include <cctype>
#include <cerrno>
#include <clocale>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <deque>
#include <exception>
#include <fstream>
#include <iostream>
using namespace std;
int main()
{
xxx;
xxx;
return 0;
}
而现在......
#include <bits/stdc++.h>
using namespace std;
int main()
{
xxx;
xxx;
return 0;
}
是不是甚至感到有些尬?这个招数非常好用,记得点赞关注哦~