之前在OJ上刷题时发现在Solution里有些人竟然是这么写的:
#include <bits/stdc++.h>
int main()
{
...
}
于是百度了以下,发现原来<bits/stdc++.h>包含了所有C++的头文件。这样在OJ上刷题的时候就可以直接敲一句#include <bits/stdc++.h>搞定,而不需要敲很多#include。(虽然如此,我还是习惯于把所有头文件都敲出。)
不过注意,直到现在POJ还不支持<bits/stdc++.h>。HDU已经支持。
接下来要说的就是<bits/stdc++.h>的内容。网上有很多篇关于这个头文件的文章,但没有一个列出该头文件全部的内容。这里就把Dev-C++ 5.11下的<bits/stdc++.h>的全部内容列出:
// C++ includes used for precompiling -*- C++ -*-
// Copyright (C) 2003-2014 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Softwar