Skip to Content
C++程序设计:原理与实践(基础篇)(原书第2版)
book

C++程序设计:原理与实践(基础篇)(原书第2版)

by 本贾尼 斯特劳斯特鲁普
August 2021
Intermediate to advanced
450 pages
9h 36m
Chinese
Pearson
Content preview from C++程序设计:原理与实践(基础篇)(原书第2版)

附言

模板和异常是十分强大的语言特性。它们为编程技术带来了相当的灵活性——主要是允许人们分离关注点,即,一次只处理一个问题。例如,通过使用模板,我们可以在不关注元素类型的情况下设计一个容器,例如vector。类似地,通过使用异常,我们能够将用于检测和报告错误的代码和处理该错误的代码相分离。本章的第三个主题——改变vector的大小,也体现了这一灵活性:push_back()、resize()和reserve()使我们能够将vector的定义与vector的大小说明相分离。

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

C++语言导学(原书第2版)

C++语言导学(原书第2版)

本贾尼 斯特劳斯特鲁普
管理Kubernetes

管理Kubernetes

Brendan Burns, Craig Tracey
Go程序设计语言

Go程序设计语言

艾伦A. A.多诺万, 布莱恩W. 柯尼汉

Publisher Resources

ISBN: 9787111562252