zoukankan      html  css  js  c++  java
  • C++ 标准库和标准模板库

    C++中的标准库是使用c++语言写代码的时候使用的基础库,不需要安装。

    标准模板库(STL)是标准库的一部分,与C++标准库的区分不明显,只是说指定的那几个头文件下所包含的内容就是属于标准模板库的。

    标准模板库的头文件一般包括以下几个:<algorithm>、<deque>、<functional>、<iterator>、<vector>、<list>、<map>、<memory>、<numeric>、<queue>、<set>、<stack> 和<utility>

    标准库中除了标准模板库之外,还包含了C的标准库,并且进行可一些扩展,还有一些自己的库。

    std是一个命令空间,标准库下的所有内容都在这个命名空间下。

    在C中我们引用C的标准库的头文件格式一般是#include <xxx.h>,在C++中也可以直接使用C的标准库,但我们在引用头文件的时候最好使用#include <cxxx>。他们里面的内容都是一致的,只是C++的标准库将C的标准库符号放到了std命名空间下。这些头文件包括:<cassert><cctype><cerrno><cfenv><cfloat><cinttypes><ciso646><climits><clocale><cmath><csetjmp><csignal><cstdarg><cstdbool><cstddef><cstdint><cstdio><cstdlib><cstring><ctgmath><ctime><cuchar><cwchar><cwctype>

    <cassert>
    <cctype>
    <cerrno>
    <cfenv>
    <cfloat>
    <cinttypes>
    <ciso646>
    <climits>
    <clocale>
    <cmath>
    <csetjmp>
    <csignal>
    <cstdarg>
    <cstdbool>
    <cstddef>
    <cstdint>
    <cstdio>
    <cstdlib>
    <cstring>
    <ctgmath>
    <ctime>
    <cuchar>
    <cwchar>
    <cwctype>
  • 相关阅读:
    tcp/心跳包
    TCP协议中的三次握手和四次挥手(图解)
    http 中get和post
    xmpp总结
    IOS中http请求使用cookie
    sdwebimage总结
    iOS断言
    Object-C自定义对象NSLog输入信息
    NSTimer你真的会用了吗
    ios中block中的探究
  • 原文地址:https://www.cnblogs.com/maycpou/p/14190704.html
Copyright © 2011-2022 走看看