本书是一本全面、易用的C++编程语言教材。作者用清晰、简洁的风格讲解概念和技术,帮助读者掌握控制结构、函数、数组、指针和串、类和数据抽象、运算符重载、文件处理以及数据结构等关键内容。每章中间的自测题、章末的编程项目、丰富的实例、大量的代码,为读者提供了掌握C++编程概念所必需的实战演练。
本书的主要特点
●全面介绍了标准模板库 (STL)。STL是理解C++语言的必需要素,体现了C++丰富的功能性和多样性。
●涵盖了高级C++主题,包括虚函数、模板和异常。
●讲述了继承、多态和封装。
●讨论了统一建模语言 (UML) 和设计模式。
●包含50多个新的章末编程项目。
●提供了完整的教学支持资源。
无
无
Walter Savitch:Walter Savitch: 加州大学圣迭戈分校计算机科学与工程系教授。他于1969年在加州大学伯克利分校获得博士学位。他的研究领域包括复杂性理论、形式语言理论、计算语言学等。除了为数众多的研究论文外,他还著有多部计算机科学教材,包括《Absolute Java》、《Problem Solving with C++》、《Java: An Introduction to Computer Science and Programming》等。
无
Chapter 1: C++ Basics
Introduction to C++
Variables, Expressions, and Assignment Statements
Console Input/Output
Program Style
Libraries and Namespaces
Chapter 2: Flow of Control
Boolean Expression
Branching Mechanisms
Loops
Chapter 3: Function Basics
Predefined Functions
Programmer-Defined Functions
Scope Rules
Chapter 4: Parameters and Overloading
Parameters
Overloading and Default Arguments
Testing and Debugging Functions
Chapter 5: Arrays
Introduction to Arrays
Arrays in Functions
Programming with Arrays
Multidimensional Arrays
Chapter 6: Structures and Classes
Structures
Classes
Chapter 7: Constructors and Other Tools
Constructors
More Tools
Vectors-A Preview of the Standard Template Library
Chapter 8: Operator Overloading, Friends, and References
Basic Operator Overloading
Friend Functions and Automatic Type Conversion
References and More Overloaded Operators
Chapter 9: Strings
An Array Type for Strings
Character Manipulation Tools
The Standard Class string
Chapter 10: Pointers and Dynamic Arrays
Pointers
Dynamic Arrays
Classes, Pointers, and Dynamic Arrays
Chapter 11: Separate Compilation and Namespaces
Separate Compilation
Namespaces
Chapter 12: Streams and File I/O
I/O Streams
Tools for Stream I/O
Stream Hierarchies: A Preview of Inheritance
Random Access to Files
Chapter 13: Recursion
Recursive void Functions
Recursive Functions that Return a Value
Thinking Recursively
Chapter 14: Inheritance
Inheritance Basics
Programming with Inheritance
Chapter 15: Polymorphism and Virtual Functions
Virtual Function Basics
Pointers and Virtual Functions
Chapter 16: Templates
Function Templates
Class Templates
Templates and Inheritance
Chapter 17: Linked Data Structures
Nodes and Linked Lists
Linked List Applications
Iterators
Trees
Chapter 18: Exception Handling
Exception Handling Basics
Programming Techniques for Exception Handling
Chapter 19: Standard Template Library
Iterators
Containers
Generic Algorithms
Chapter 20: Patterns and UML
Patterns
UML
Appendix 1: C++ Keywords
Appendix 2: Precedence of Operators
Appendix 3: The ASCII Character Set
Appendix 4: Some Library Functions
Appendix 5: Old and New Header Files
Further Reading
Index