C++ Standard Library - C++ 标准库

C++ Standard Library - C++ 标准库

In the C++ programming language, the C++ Standard Library is a collection of classes and functions, which are written in the core language and part of the C++ ISO Standard itself.
C++ 中的标准程序库 (Standard Library) 是类和函数的集合,其使用核心语言写成。标准程序库提供若干泛型容器、函数对象、泛型字符串和流 (包含交互和文件 I/O),支持部分语言特性和常用的函数。C++ 标准程序库也吸收了 ISO C90 C 标准程序库。标准程序库的特性宣告于 std 名字空间之中。

C++ 标准程序库大量参考了并基于标准模板程序库 (STL) 所创建的习惯用法,包含容器、算法、迭代器、函数对象等。此一部分占去标准库相当大的比重,因而有些人错误地使用 STL 指称整个 C++ 标准程序库。但这并非为正确的概念,C++ 标准程序库和 STL 共有了许多特性,但都不是彼此的超集。

使用 C++ 标准程序库时,不必加上 .h

1. C standard library - C 标准库

来自 C 标准库的所有头文件,以另一个名称包含在 C++ 标准中。将原名称移去 .h 并在开头处加上 c 作为新的名称。例如 time.h 改成 ctime。C++ 标准库的头文件与 C 标准库的头文件的唯一区别是,函数位于 std:: 名字空间 (虽然很少编译器严格如此,通常的做法是同时放在全局与 std 内,例如 printfstd::printf 两者均有)。

The C++ standard library provides a set of common classes and interfaces that greatly extend the core C++ language. The library, however, is not self-explanatory. To make full use of its components - and to benefit from their power - you need a resource that does far more than list the classes and their functions. The C++ Standard Library - A Tutorial and Reference, 2nd Edition describes this library as now incorporated into the new ANSI/ISO C++ language standard (C++11). The book provides comprehensive documentation of each library component, including an introduction to its purpose and design; clearly written explanations of complex concepts; the practical programming details needed for effective use; traps and pitfalls; the exact signature and definition of the most important classes and functions; and numerous examples of working code. The book focuses on the Standard Template Library (STL), examining containers, iterators, function objects, and STL algorithms. You will also find detailed coverage of strings, concurrency, random numbers and distributions, special containers, numerical classes, internationalization, and the IOStreams library. An insightful introduction to fundamental concepts and an overview of the library will help bring newcomers quickly up to speed. A comprehensive index will support the C++ programmer in his/her day-to-day life. Extending the overall content by about 50%, the book now also covers all the new C++11 library components, including Concurrency Fractional arithmetic Clocks and Timers Random numbers and distributions New smart pointers Regular expressions New STL containers, such as arrays, forward lists, and unordered containers New STL algorithms Tuples Type traits and type utilities
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

Yongqiang Cheng

梦想不是浮躁,而是沉淀和积累。

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值