该博客记录一些小知识点,以备复习,逐渐补充...
1.万能头文件:
#include<bits/stdc++.h>包含了目前c++所包含的所有头文件!!!基本上所有的代码只要用了这个头文件就不再写其他头文件了。
2.头文件
【1】https://blog.csdn.net/FX677588/article/details/52957601
3.位操作
【1】https://blog.csdn.net/xiaopihaierletian/article/details/78162863
【2】
4.C++ double 输出精度问题,保留几位小数。
#include<iostream>
#include<iomanip>
using namespace std;
int main()
{
double a=3.1415;
cout<<fixed<<setprecision(1)<<a<<endl; //输出保留一位小数
}