首先,我们将讨论C万能头文件。 并不是在POJ等所有场合都能使用。
我在POJ上提交过程序,是编译错误。 因为我用了万能头文件。
这意味着你不知道bits/stdc .h。
因为,万能头文件,并不是stdC++的一部分!!!
存储位置
是的,在C的库文件夹中,有一个“bits”文件夹,找到了“万能头文件”。
文件内容//cincludesusedforprecompiling---- c---//copyright (c ) 2003-2014 freesoftware foundation、 Inc.//this fiish youcanredistributeitand/ormodifyitunderthe/termsofthegnugeneralpubliclicenseaspublishedbythe//freeesoson or(atyouroption )/anylaterversion.//thislibraryisdistributedinthehopethatitwillbeuseful,/butwillbeuseful withouteventheimpliedwarrantyof/merchantabilityorfitnessforaparticularpurpose.see the//gnugeneralpubliclicenseformoredise under section7of GPL version 3,youaregrantedadditional//permissionsdescribedinthegcruntimed version//3.1 aspublishedbythefreesoftwarefoundation.//youshouldhavereceivedacopyofthegnugeneralpubliclicenseand/acopyon seethefilescopying3and copying.runtime respectively.if not, see//http://www.GNU.org/licenses/./* * @ files TDC.h * thisisanimplementationfileforaprecompiledheader.*/110 ifiles include cctype # includecerrno # includecfloat # include ciso 646 # include cmath # includecsetjmp # includecsignal # includecstststdate includecstdlib # includecstdef # include if _ cplusplus=201103 l # includeccomplex # includecfenv # includecintttypes # includ includecstdalign # includecstdboool # include includecwchar # includecwctype # endif//c # include algorithm # include bitset # includeexcepper include functional # includeiomanip # include IOs # include iostream # include istream # include itetion include map # include memory # include new # include numeric # include ostream # include queue # includeset # includeset # include inude include string # include type info # include utility # include valarray # if include array # include atomic # include core include forward _ list # include future # include include random # include ratio # include regex # include scoped _ allocator # incator include tupper include type _ traits # include unordered _ map # include unordered _ set # endif非常简单和粗暴。 也就是说,包含所有的头文件就可以了。
可以使用场景小学生的“信息和未来”。 我用这个万能头文件,很方便。
在其他场景中,请谨慎使用。
此外,万能头文件不包含其他头文件,例如:
#include windows.h头文件非常实用,但不包括在内。
总结这就是所谓的万能头文件,但这个头文件不是万能的,特别是在某些OJ和比赛中不使用。