C 標頭檔案

2puT發表於2016-07-17

標準C語言標頭檔案

ISOC標準定義的標頭檔案(24)

<assert.h>驗證程式斷言<complex.h> 支援複數算術運算<ctype.h> 字元型別

<errno.h> 出錯碼<fenv.h> 浮點環境<float.h> 浮點常量

<inttypes.h> 整型格式轉換<iso646.h>替代關係操作符巨集<limits.h> 實現常量

<locale.h> 區域性類別<math.h> 數學常量<setjmp.h>非區域性goto

<signal.h> 訊號<stdarg.h> 可變參數列<stdbool.h> 布林型別和值

<stddef.h> 標準定義<stdint.h> 整型<stdio.h> 標準I/O

<stdlib.h> 實用程式庫函式 <string.h> 字串操作<tgmath.h> 通用型別數學巨集

<time.h> 時間和日期<wchar.h> 寬字元支援<wctype.h> 寬字元分類和對映支援

POSIX標準定義的必須的標頭檔案(26)

<dirent.h> 目錄項<fcntl.h> 檔案控制<fnmatch.h> 檔名匹配型別

<glob.h> 路徑名模式匹配型別<grp.h> 組檔案<netdb.h> 網路資料庫操作

<pwd.h>口令檔案<regex.h> 正規表示式<tar.h> tar歸檔值

<termios.h> 終端I/O<unistd.h> 符號常量<utime.h> 檔案時間

<wordexp.h> 字擴充套件型別<arpa/inet.h> Internet定義<net/if.h> 套接字本地介面

<netinet/in.h>Internet地址族<netinet/tcp.h> 傳輸控制協議<sys/mman.h> 記憶體管理宣告

<sys/select.h> select函式<sys/socket.h> 套接字介面<sys/stat.h> 檔案狀態

<sys/times.h> 程式時間<sys/types.h> 基本系統資料型別<sys/un.h> UNIX域套接字定義

<sys/utsname.h>系統名<sys/wait.h> 程式控制

POSIX標準定義的XSI擴充套件標頭檔案(26)

<cpio.h>cpio歸檔值<dlfcn.h> 動態連結<fmtmsg.h> 訊息顯示結構

<ftw.h> 檔案樹漫遊<iconv.h> 程式碼集轉換實用程式<langinfo.h> 語言資訊常量

<libgen.h> 模式匹配函式定義<monetary.h> 貨幣型別<ndbm.h> 資料庫操作

<nl_types.h> 訊息類別<poll.h> 輪詢函式<search.h> 搜尋表

<strings.h> 字串操作<syslog.h> 系統出錯日誌記錄<ucontext.h> 使用者上下文

<ulimit.h> 使用者限制<utmpx.h> 使用者帳戶資料庫<sys/ipc.h>IPC

<sys/msg.h> 訊息佇列<sys/resource.h>資源操作<sys/sem.h> 訊號量

<sys/shm.h> 共享儲存<sys/statvfs.h> 檔案系統資訊<sys/time.h> 時間型別

<sys/timeb.h> 附加的時間<sys/uio.h> 向量I/O操作

POSIX標準定義的可選標頭檔案(8)

<aio.h> 非同步I/O<mqueue.h> 訊息佇列<pthread.h> 執行緒

<sched.h> 執行排程<semaphore.h>訊號量<spawn.h> 實時spawn介面

<stropts.h> XSISTREAMS介面<trace.h> 時間跟蹤

標準 C++語言標頭檔案54其中16個用於構建STL,3個為附加非必須 

<algorithm> STL通用演算法 <bitset>STL位集容器 <cassert> 用於在程式執行時執行斷言

<cctype>字元處理 <cerrno>錯誤碼 <cfloat> 用於測試浮點型別屬性
<ciso646> ISO646
變體字符集 <climits> 測試整數型別屬性 <clocale>本地化函式

<cmath>數學函式 <complex> 複數類 <csetjmp> 執行非內部的goto語句

<csignal> 訊號 <cstdarg> 訪問引數數量變化的函式 <cstddef> 用於定義實用的型別和巨集

<cstdio>輸入/輸出 <cstdlib>雜項函式及記憶體分配 <cstring>字串

<ctime>時間 <cwchar>寬字元處理及輸入/輸出 <cwctype>寬字元分類

<deque>STL雙端佇列容器 <exception>異常處理類 <fstream>檔案流

<functional>STL函式物件<iomanip>引數化輸入/輸出<ios> 基本輸入/輸出支援

<iosfwd>輸入/輸出前置宣告 <iostream>資料流輸入/輸出 <istream>基本輸入流

<iterator>遍歷序列的類 <limits>各種資料型別最值常量<list> STL線性列表容器

<locale>國際化支援<map>STL對映容器<memory>專用記憶體分配器

<new>基本記憶體分配和釋放 <numeric>通用的數字操作 <ostream>基本輸出流

<queue> STL佇列容器<set>STL集合容器<sstream>基於字串的流

<stack>STL堆疊容器 <stdexcept>標準異常類 <streambuf>iostream 的緩衝區類

<string>字串類 <strstream> 非記憶體字元序列的流類 <typeinfo> 執行時型別標識

<utility>STL通用模板類 <valarray> 支援值陣列的類和模版類<vector>STL動態陣列容器

標準C++附加的標頭檔案(3)非必須

<hash_map><hash_set><slist>

TheStandard C++ library consists of 51 required headers.Thisimplementation also includes three additionalheaders,<hash_map>,<hash_set>,and <slist>,notrequired by the C++ Standard, for a total of 54 headers.Of these 54headers,16 constitute the Standard Template Library, or STL.These areindicated below with the notation
<algorithm>-- (STL) for defining numerous templates that implement usefulalgorithms
<bitset> -- for defining a template class thatadministers sets of bits
<complex> -- for defining atemplate class that supports complex arithmetic
<deque> --(STL) for defining a template class that implements a dequecontainer
<exception> -- for defining several functionsthat control exception handling
<fstream> -- fordefining several iostreams template classes that manipulate exteralfiles
<functional> --(STL) for defining several templates that help construct predicatesfor
the templates defined in<algorithm> and <numeric>
<hash_map>-- (STL) for defining template classes that implement hashedassociative containers
that map keys to values
<hash_set>-- (STL) for defining template classes that implement hashedassociative containers
<iomanip> -- for declaringseveral iostreams manipulators that take an argument
<ios>-- for defining the template class that serves as the base for manyiostreams classes
<iosfwd> -- for declaring severaliostreams template classes before they are necessarily
defined
<iostream> -- for declaring theiostreams objects that manipulate the standard streams
<istream>-- for defining the template class that performs extractions
<iterator>-- (STL) for defining several templates that help define andmanipulate iterators
<limits> -- for testing numerictype properties
<list>-- (STL) for defining a template class that implements a doublylinked list container
<locale> -- for defining severalclasses and templates that control
locale-specific behavior, as in the iostreams classes
<map> --(STL) for defining template classes that implement associativecontainers that
map keys to values
<memory>-- (STL) for defining several templates that allocate and freestorage for various
container classes
<new>-- for declaring several functions that allocate and free storage
<numeric>-- (STL) for defining several templates that implement usefulnumeric functions
<ostream> -- for defining the templateclass that performs insertions
<queue> --(STL) for defining a template class that implements a queue container
<set>-- (STL) for defining template classes that implement associativecontainers
<slist>-- (STL) for defining a template class that implements a singlylinked list container
<sstream> -- for defining severaliostreams template classes that manipulate string containers
<stack> --(STL) for defining a template class that implements a stack container
<stdexcept> -- for defining several classes useful forreporting exceptions
<streambuf> -- for defining templateclasses that buffer iostreams operations
<string> -- fordefining a template class that implements a string container
<strstream> -- for defining several iostreams classesthat manipulate in-memory character
sequences
<typeinfo> -- for defining class type_info, the resultof the typeid operator
<utility>-- (STL) for defining several templates of general utility
<valarray> -- for defining several classes and templateclasses that support value-oriented
arrays
<vector>-- (STL) for defining a template class that implements a vectorcontainer
新的C標準庫
<cassert>-- for enforcing assertions when functions execute
<cctype>-- for classifying characters
<cerrno> -- for testingerror codes reported by library functions
<cfloat> --for testing floating-point type properties
<ciso646> --for programming in ISO 646 variant character sets
<climits>-- for testing integer type properties
<clocale> -- foradapting to different cultural conventions
<cmath> --for computing common mathematical functions
<csetjmp> --for executing nonlocal goto statements
<csignal> -- forcontrolling various exceptional conditions
<cstdarg> --for accessing a varying number of arguments
<cstddef> --for defining several useful types and macros
<cstdio> --for performing input and output
<cstdlib> -- forperforming a variety of operations
<cstring> -- formanipulating several kinds of strings
<ctime> -- forconverting between various time and date formats
<cwchar>-- for manipulating wide streams and several kinds of strings
<cwctype> -- for classifying wide characters
舊的C標準庫
<assert.h>-- for enforcing assertions when functions execute
<ctype.h>-- for classifying characters
<errno.h> -- for testingerror codes reported by library functions
<float.h> --for testing floating-point type properties
<iso646.h> --for programming in ISO 646 variant character sets
<limits.h>-- for testing integer type properties
<locale.h> --for adapting to different cultural conventions
<math.h>-- for computing common mathematical functions
<setjmp.h>-- for executing nonlocal goto statements
<signal.h> --for controlling various exceptional conditions
<stdarg.h>-- for accessing a varying number of arguments
<stddef.h>-- for defining several useful types and macros
<stdio.h>-- for performing input and output
<stdlib.h> -- forperforming a variety of operations
<string.h> -- formanipulating several kinds of strings
<time.h> -- forconverting between various time and date formats
<wchar.h>-- for manipulating wide streams and several kinds of strings
<wctype.h> -- for classifying wide characters


Finally,in this implementation, the Standard C++ library also includesseveral headers for compatibility with traditional C++ libraries:
<fstream.h> -- for defining several iostreams templateclasses that manipulate exteral files
<iomanip.h> -- fordeclaring several iostreams manipulators that take an argument
<iostream.h> -- for declaring the iostreams objects thatmanipulate the standard streams
<new.h> -- for declaringseveral functions that allocate and free storage
<stl.h>-- for declaring several template classes that aid migration fromolder versions
of the Standard Template Library

相關文章