本书介绍标准C++及其编程、设计中的关键技术。标准C++较之以前的版本,功能更强大,其中许多特性,如名字空间、例外、模板、运行时类型声明等使得新技术得以直接应用。本书围绕语言及库功能来组织,内容涉及C++的主要特征及标准库,并通过系统软件领域中的实例解释说明一些关键性的概念与技术。\r\n 本书作者是C++的发明人,对C++语言有着全面、深入的理解,因此他强调应将语言作为设计与编程的工具,而不仅仅是语言本身,强调只有对语言功能有了深入了解之后才能真正掌握它。本书编写的目的就是帮助读者了解C++是如何支持编程技术的,使读者能从中获得新的理解,从而成为一名优秀的编程人员和设计人员。
Contents:\r\nPreface\r\nPreface to First Edition\r\nIntroductory Material\r\nIntroductory Material\r\n 1 Notes to Reader\r\n 2 A Tour of C++\r\n 3 A Tour of the Standard Library\r\nPart I: Basic Facilities\r\n 4 Types and Declarations\r\n 5 Pointers, Arrays, and Structures\r\n 6 Expressions and Statements\r\n 7 Functions\r\n 8 Namespaces and Exceptions\r\n 9 Source Files and Programs\r\nPart II: Abstraction Mechanisms\r\n 10 Classes\r\n 11 Operator Overloading\r\n 12 Derived Classes\r\n 13 Templates\r\n 14 Exception Handling\r\n 15 Class Hierarchies\r\nPart III: The Standard Library\r\n 16 Library Organization and Containers\r\n 17 Standard Containers\r\n 18 Algorithms and Function Objects\r\n 19 Iterators and Allocators\r\n 20 Strings\r\n 21 Streams\r\n 22 Numerics\r\nPart IV: Design Using C++\r\n 23 Development and Design\r\n 24 Design and Programming\r\n 25 Roles of Classes\r\nAppendices\r\n A The C++ Grammar\r\n B Compatibility\r\n C Technicalities\r\n D Locales\r\n E Standard Library Exception Safety\r\nIndex
I find using C++ more enjoyable than ever. C++'s support for design and programming has improved dramatically over the years, and lots of new helpful techniques have been developed for its use. However, C++ is not just fun. Ordinary practical programmers have achieved significant improvements in productivity, maintainability, flexibility, and quality in projects of just about any kind and scale. By now, C++ has fulfilled most of the hopes I originally had for it, and also succeeded at tasks I hadn't even dreamt of.
This book introduces standard C++t and the key programming and design techniques supported by C++. Standard C++ is a far more powerful and polished language than the version of C++ introduced by the first edition of this book. New language features such as namespaces, exceptions, templates, and run-time type identification allow many techniques to be applied more directly than was possible before, and the standard library allows the programmer to start from a much higher level than the bare language.
About a third of the information in the second edition of this book came from the first. This third edition is the result of a rewrite of even larger magnitude. It offers something to even the most experienced C++ programmer; at the same time, this book is easier for the novice to approach than its predecessors were. The explosion of C++ use and the massive amount of experience accumulated as a result makes this possible.
The del'tuition of an extensive standard library makes a difference to the way C++ concepts can be presented. As before, this book presents C++ independently of any particular implementation, and as before, the tutorial chapters present language constructs and concepts in a "bottom up" order so that a construct is used only after it has been defined. However, it is much easier to use a well-designed library than it is to understand the details of its implementation. Therefore, the standrd library can be used to provide realistic and interesting examples well before a reader can be assumed to understand its inner workings. The standard library itself is also a fertile source of programming examples and design techniques.
This book presents every major C++ language feature and the standard library. It is organized around language and library facilities. However, features are presented in the context of their use. That is, the focus is on the language as the tool for design and programming rather than on the lan-guage in itself. This book demonstrates key techniques that make C++ effective and teaches the fundamental concepts necessary for mastery. Except where illustrating technicalities, examples are taken from the domain of systems software. A companion, The Annotated C+ + Language Standard, presents the complete language definition together with annotations to make it more comprehensible.
The primary aim of this book is to help the reader understand how the facilities offered by C++ support key programming techniques. The aim is to take the reader far beyond the point where he or she gets code running primarily by copying examples and emulating programming styles from other languages. Only a good understanding of the ideas behind the language facilities leads to mastery. Supplemented by implementation documentation, the information provided is sufficient for completing significant real-world projects. The hope is that this book will help the reader gain new insights and become a better programmer and designer.