Book description
Geared to experienced C++ developers who may not be familiar with the more advanced features of the language, and therefore are not using it to its full capabilities
Teaches programmers how to think in C++-that is, how to design effective solutions that maximize the power of the language
The authors drill down into this notoriously complex language, explaining poorly understood elements of the C++ feature set as well as common pitfalls to avoid
Contains several in-depth case studies with working code that's been tested on Windows, Linux, and Solaris platforms
Table of contents
- Copyright
- Acknowledgments
- Author Bios
- Credits
- Introduction
-
1. A Crash Course in C++
- 1.1. The Basics of C++
- 1.2. Diving Deeper into C++
- 1.3. C++ as an Object-Oriented Language
- 1.4. Your First Useful C++ Program
- 1.5. Summary
- 2. Designing Professional C++ Programs
-
3. Designing with Objects
-
3.1. An Object-Oriented View of the World
- 3.1.1. Am I Thinking Procedurally?
- 3.1.2. The Object-Oriented Philosophy
- 3.1.3. Living in a World of Objects
- 3.1.4. Object Relationships
- 3.1.5. Abstraction
- 3.2. Summary
-
3.1. An Object-Oriented View of the World
-
4. Designing with Libraries and Patterns
-
4.1. Reusing Code
- 4.1.1. A Note on Terminology
- 4.1.2. Deciding Whether or Not to Reuse Code
- 4.1.3. Strategies for Reusing Code
- 4.1.4. Bundling Third-Party Applications
- 4.1.5. Open-Source Libraries
-
4.1.6. The C++ Standard Library
- 4.1.6.1. C Standard Library
- 4.1.6.2. Strings
- 4.1.6.3. I/O Streams
- 4.1.6.4. Internationalization
- 4.1.6.5. Smart Pointers
- 4.1.6.6. Exceptions
- 4.1.6.7. Mathematical Utilities
- 4.1.6.8. The Standard Template Library
-
4.1.6.9. STL Algorithms
- 4.1.6.9.1. Utility Algorithms
- 4.1.6.9.2. Nonmodifying Algorithms
- 4.1.6.9.3. Search Algorithms
- 4.1.6.9.4. Numerical Processing Algorithms
- 4.1.6.9.5. Comparison Algorithms
- 4.1.6.9.6. Operational Algorithms
- 4.1.6.9.7. Modifying Algorithms
- 4.1.6.9.8. Sorting Algorithms
- 4.1.6.9.9. Set Algorithms
- 4.1.6.9.10. Choosing an Algorithm
- 4.1.6.10. What's Missing from the STL
- 4.1.6.11. Deciding Whether or Not to Use the STL
- 4.2. Designing with Patterns and Techniques
- 4.3. Summary
-
4.1. Reusing Code
-
5. Designing for Reuse
- 5.1. The Reuse Philosophy
-
5.2. How to Design Reusable Code
- 5.2.1. Use Abstraction
- 5.2.2. Structure Your Code for Optimal Reuse
- 5.2.3. Design Usable Interfaces
- 5.2.4. Reconciling Generality and Ease of Use
- 5.3. Summary
-
6. Maximizing Software-Engineering Methods
- 6.1. The Need for Process
- 6.2. Software Life-Cycle Models
-
6.3. Software-Engineering Methodologies
-
6.3.1. Extreme Programming (XP)
-
6.3.1.1. XP in Theory
- 6.3.1.1.1. Plan as You Go
- 6.3.1.1.2. Build Small Releases
- 6.3.1.1.3. Share a Common Metaphor
- 6.3.1.1.4. Simplify Your Designs
- 6.3.1.1.5. Test Constantly
- 6.3.1.1.6. Refactor When Necessary
- 6.3.1.1.7. Code in Pairs
- 6.3.1.1.8. Share the Code
- 6.3.1.1.9. Integrate Continuously
- 6.3.1.1.10. Work Sane Hours
- 6.3.1.1.11. Have a Customer on Site
- 6.3.1.1.12. Share Common Coding Standards
- 6.3.1.2. XP in Practice
-
6.3.1.1. XP in Theory
- 6.3.2. Software Triage
-
6.3.1. Extreme Programming (XP)
- 6.4. Building Your Own Process and Methodology
- 6.5. Summary
- 7. Coding with Style
-
8. Gaining Proficiency with Classes and Objects
- 8.1. Introducing the Spreadsheet Example
- 8.2. Writing Classes
-
8.3. Object Life Cycles
- 8.3.1. Object Creation
- 8.3.2. Object Destruction
- 8.3.3. Assigning to Objects
- 8.3.4. Distinguishing Copying from Assignment
- 8.4. Summary
-
9. Mastering Classes and Objects
- 9.1. Dynamic Memory Allocation in Objects
- 9.2. Different Kinds of Data Members
- 9.3. More about Methods
- 9.4. Nested Classes
- 9.5. Friends
- 9.6. Operator Overloading
- 9.7. Pointers to Methods and Members
- 9.8. Building Abstract Classes
- 9.9. Summary
-
10. Discovering Inheritance Techniques
- 10.1. Building Classes with Inheritance
- 10.2. Inheritance for Reuse
- 10.3. Respect Your Parents
- 10.4. Inheritance for Polymorphism
- 10.5. Multiple Inheritance
- 10.6. Interesting and Obscure Inheritance Issues
- 10.7. Summary
-
11. Writing Generic Code with Templates
- 11.1. Overview of Templates
- 11.2. Class Templates
- 11.3. Function Templates
-
11.4. Advanced Templates
- 11.4.1. More about Template Parameters
- 11.4.2. Template Class Partial Specialization
- 11.4.3. Emulating Function Partial Specialization with Overloading
- 11.4.4. Template Recursion
- 11.5. Summary
-
12. Understanding C++ Quirks and Oddities
- 12.1. References
- 12.2. Keyword Confusion
- 12.3. Types and Casts
- 12.4. Scope Resolution
- 12.5. Header Files
- 12.6. C Utilities
- 12.7. Summary
- 13. Effective Memory Management
- 14. Demystifying C++ I/O
-
15. Handling Errors
- 15.1. Errors and Exceptions
- 15.2. Exception Mechanics
- 15.3. Exceptions and Polymorphism
- 15.4. Stack Unwinding and Cleanup
- 15.5. Common Error-Handling Issues
- 15.6. Putting It All Together
- 15.7. Summary
-
16. Overloading C++ Operators
- 16.1. Overview of Operator Overloading
- 16.2. Overloading the Arithmetic Operators
- 16.3. Overloading the Bitwise and Binary Logical Operators
- 16.4. Overloading the Insertion and Extraction Operators
- 16.5. Overloading the Subscripting Operator
- 16.6. Overloading the Function Call Operator
- 16.7. Overloading the Dereferencing Operators
- 16.8. Writing Conversion Operators
- 16.9. Overloading the Memory Allocation and Deallocation Operators
- 16.10. Summary
- 17. Writing Efficient C++
- 18. Developing Cross-Platform and Cross-Language Applications
- 19. Becoming Adept at Testing
-
20. Conquering Debugging
- 20.1. The Fundamental Law of Debugging
- 20.2. Bug Taxonomies
- 20.3. Avoiding Bugs
- 20.4. Planning for Bugs
- 20.5. Debugging Techniques
- 20.6. Summary
-
21. Delving into the STL: Containers and Iterators
- 21.1. Containers Overview
-
21.2. Sequential Containers
-
21.2.1. Vector
- 21.2.1.1. Vector Overview
- 21.2.1.2. Dynamic-Length Vectors
-
21.2.1.3. Vector Details
- 21.2.1.3.1. Constructors and Destructors
- 21.2.1.3.2. Copying and Assigning Vectors
- 21.2.1.3.3. Comparing Vectors
- 21.2.1.3.4. Vector Iterators
- 21.2.1.3.5. Accessing Fields of Object Elements
- 21.2.1.3.6. const_iterator
- 21.2.1.3.7. Iterator Safety
- 21.2.1.3.8. Other Iterator Operations
- 21.2.1.3.9. Iterators versus Indexing
- 21.2.1.3.10. Adding and Removing Elements
- 21.2.1.3.11. Algorithmic Complexity and Iterator Invalidation
- 21.2.1.3.12. The Vector Memory Allocation Scheme
- 21.2.1.3.13. Size and Capacity
- 21.2.1.3.14. Reserving Capacity
- 21.2.1.4. Vector Example: A Round-Robin Class
- 21.2.2. The vector<bool> Specialization
- 21.2.3. deque
- 21.2.4. list
-
21.2.1. Vector
- 21.3. Container Adapters
- 21.4. Associative Containers
- 21.5. Other Containers
- 21.6. Summary
-
22. Mastering STL Algorithms and Function Objects
- 22.1. Overview of Algorithms
- 22.2. Function Objects
- 22.3. Algorithm Details
- 22.4. Algorithms and Function Objects Example: Auditing Voter Registrations
- 22.5. Summary
-
23. Customizing and Extending the STL
- 23.1. Allocators
- 23.2. Iterator Adapters
-
23.3. Extending the STL
- 23.3.1. Why Extend the STL?
- 23.3.2. Writing an STL Algorithm
-
23.3.3. Writing an STL Container
-
23.3.3.1. A Basic Hashmap
- 23.3.3.1.1. The Hash Function
- 23.3.3.1.2. The Hashmap Interface
- 23.3.3.1.3. The Compare Template Argument
- 23.3.3.1.4. The Hash Template Argument
- 23.3.3.1.5. The typedefs
- 23.3.3.1.6. The Implementation
- 23.3.3.1.7. The Constructor
- 23.3.3.1.8. Destructor, Copy Constructor, and Assignment Operator
- 23.3.3.1.9. Element Lookup
- 23.3.3.1.10. Element Insert
- 23.3.3.1.11. Element Delete
- 23.3.3.1.12. Using the Basic Hashmap
-
23.3.3.2. Making the Hashmap an STL Container
- 23.3.3.2.1. Typedef Container Requirements
- 23.3.3.2.2. Method Container Requirements
- 23.3.3.2.3. Writing an Iterator
- 23.3.3.2.4. The HashIterator Class
- 23.3.3.2.5. The HashIterator Method Implementations
- 23.3.3.2.6. Const Iterators
- 23.3.3.2.7. Iterator Typedefs and Access Methods
- 23.3.3.2.8. Using the HashIterator
- 23.3.3.3. Note on Allocators
- 23.3.3.4. Note on Reversible Containers
- 23.3.3.5. Making the Hashmap an Associative Container
- 23.3.3.6. Note on Sequential Containers
-
23.3.3.1. A Basic Hashmap
- 23.4. Summary
-
24. Exploring Distributed Objects
- 24.1. The Appeal of Distributed Computing
- 24.2. Distributed Objects
- 24.3. CORBA
- 24.4. XML
- 24.5. Summary
- 25. Incorporating Techniques and Frameworks
- 26. Applying Design Patterns
-
A. C++ Interviews
- A.1. Chapter 1: A Crash Course in C++
- A.2. Chapter 2: Designing Professional C++ Programs
- A.3. Chapter 3: Designing with Objects
- A.4. Chapter 4: Designing with Libraries and Patterns
- A.5. Chapter 5: Designing for Reuse
- A.6. Chapter 6: Maximizing Software Engineering Methods
- A.7. Chapter 7: Coding with Style
- A.8. Chapters 8 and 9: Classes and Objects
- A.9. Chapter 10: Discovering Inheritance Techniques
- A.10. Chapter 11: Writing Generic Code with Templates
- A.11. Chapter 12: Understanding C++ Quirks and Oddities
- A.12. Chapter 13: Effective Memory Management
- A.13. Chapter 14: Demystifying C++ I/O
- A.14. Chapter 15: Handling Errors
- A.15. Chapter 16: Overloading C++ Operators
- A.16. Chapter 17: Writing Efficient C++
- A.17. Chapter 18: Developing Cross-Platform and Cross-Language Applications
- A.18. Chapter 19: Becoming Adept at Testing
- A.19. Chapter 20: Conquering Debugging
- A.20. Chapters 21, 22, and 23: The Standard Template Library
- A.21. Chapter 24: Exploring Distributed Objects
- A.22. Chapter 25: Incorporating Techniques and Frameworks
- A.23. Chapter 26: Applying Design Patterns
-
B. Annotated Bibliography
- B.1. C++
- B.2. C
- B.3. Integrating C++ and Other Languages
- B.4. Algorithms and Data Structures
- B.5. Open-Source Software
- B.6. Software-Engineering Methodology
- B.7. Programming Style
- B.8. Computer Architecture
- B.9. Efficiency
- B.10. Testing
- B.11. Debugging
- B.12. Distributed Objects
- B.13. Design Patterns
- 27. Standard Library Header Files
-
28. Standard Library Reference
-
BC2.1. Containers
- BC2.1.1. Common Typedefs
- BC2.1.2. Common Iterator Methods
- BC2.1.3. Common Comparison Operators
- BC2.1.4. Other Common Functions and Methods
- BC2.1.5. Note on Running Time
- BC2.1.6. Sequential Containers
-
BC2.1.7. vector
- BC2.1.7.1. Iterator
- BC2.1.7.2. Template Definition
- BC2.1.7.3. Constructors, Destructors, and Assignment Methods
- BC2.1.7.4. Adding and Deleting Elements
- BC2.1.7.5. Accessing Elements
- BC2.1.7.6. Retrieving and Setting Size and Capacity
- BC2.1.7.7. The vector<bool> Specialization
- BC2.1.7.8. reference Class
- BC2.1.7.9. Bit Methods
- BC2.1.8. deque
- BC2.1.9. list
- BC2.1.10. Container Adapters
- BC2.1.11. stack
- BC2.1.12. queue
- BC2.1.13. priority_queue
- BC2.1.14. Associative Containers
- BC2.1.15. Associative Container Typedefs
- BC2.1.16. map and multimap
- BC2.1.17. set and multiset
- BC2.1.18. bitset
- BC2.1.19. Template Definition
- BC2.1.20. string
- BC2.1.21. Iterator
- BC2.1.22. Note on Exceptions
- BC2.1.23. Note on npos
- BC2.1.24. Constructors, Destructors, and Assignment Methods
- BC2.1.25. Adding and Deleting Characters
- BC2.1.26. Accessing Characters
- BC2.1.27. Obtaining Characters
- BC2.1.28. Retrieving and Setting Size and Capacity
- BC2.2. Algorithms
- BC2.3. Streams
-
BC2.1. Containers
Product information
- Title: Professional C++
- Author(s):
- Release date: January 2005
- Publisher(s): Wrox
- ISBN: 9780764574849
You might also like
book
Professional C++, 4th Edition
Get up to date quickly on the new changes coming with C++17 Professional C++ is the …
book
Professional C++, 3rd Edition
Master complex C++ programming with this helpful, in-depth resource From game programming to major commercial software …
book
Expert C++
Design and architect real-world scalable C++ applications by exploring advanced techniques in low-level programming, object-oriented programming …
video
Beginning C++
C++ is a powerful high-level language with a wealth of recently added features that enhance its …