[C++]C++与C头文件辨析(比较)

   

C++/C头文件辨析
C++标准库C标准库C++标准模板库
ios   vector
iomanip   deque
sstream   list
fstream   map
    set
  < complex.h > queue
  < fenv.h > bitset
  < float.h > algorithm
  < inttypes.h > functional
  < iso646.h > iterator
  < stdbool.h >  array
  < tgmath.h >  stack
  < wchar.h >  
  < wctype.h >  
     
iostream < iostream.h >  
cassert < assert.h >  
cctype < ctype.h >  
cerrno < errno.h >  
climits < limits.h >  
clocale < locale.h >  
cmath < math.h >  
csetjmp < setjmp.h >  
csignal < signal.h >  
cstdarg < stdarg.h >  
cstddef < stddef.h >  
cstdio < stdio.h >  
cstdint < stdint.h >  
cstdlib < stdlib.h >  
cstring < string.h >  
ctime < time.h >  
注释:< string >与ctring,string.h无关,属于C++的新的string类

 

常用STL文件:

注:STL的命名空间名称是std,使用时必须要包含"using namespace std;"

一 迭代器

  <iterator>

二 输入输出流

  <iostream>(标准输入输出流)

  <fstream>(文件输入输出流)

  <sstream>(字符串输入输出流)

三 字符串

  <string>

四 函数对象

  <functional>

五 通用容器

  <vector>(向量容器)

  <deque>(双端队列)

  <list>(链表容器)

  <query>(队列/优先队列)

  <stack>(栈)

  <set>(集合/多集合/位集合)

  <map>(映射/多映射)

六 通用算法

  <algorithm>

七 数值算法

  <numberic>

posted @ 2017-09-22 09:53  千千寰宇  阅读(258)  评论(0编辑  收藏  举报