Professional C++, 3rd Edition

Book description

Master complex C++ programming with this helpful, in-depth resource

From game programming to major commercial software applications, C++ is the language of choice. It is also one of the most difficult programming languages to master. While most competing books are geared toward beginners, Professional C++, Third Edition, shows experienced developers how to master the latest release of C++, explaining little known features with detailed code examples users can plug into their own codes. More advanced language features and programming techniques are presented in this newest edition of the book, whose earlier editions have helped thousands of coders get up to speed with C++. Become familiar with the full capabilities offered by C++, and learn the best ways to design and build applications to solve real-world problems.

Professional C++, Third Edition has been substantially revised and revamped from previous editions, and fully covers the latest (2014) C++ standard. Discover how to navigate the significant changes to the core language features and syntax, and extensions to the C++ Standard Library and its templates. This practical guide details many poorly understood elements of C++ and highlights pitfalls to avoid.

  • Best practices for programming style, testing, and debugging

  • Working code that readers can plug into their own apps

  • In-depth case studies with working code

  • Tips, tricks, and workarounds with an emphasis on good programming style

  • Move forward with this comprehensive, revamped guide to professional coding with C++.

    Table of contents

    1. Part I: Introduction to Professional C++
      1. Chapter 1: A Crash Course in C++ and the STL
        1. The Basics of C++
        2. Diving Deeper into C++
        3. C++ as an Object-Oriented Language
        4. The Standard Library
        5. Your First Useful C++ Program
        6. Summary
      2. Chapter 2: Working with Strings
        1. Dynamic Strings
        2. Summary
      3. Chapter 3: Coding with Style
        1. The Importance of Looking Good
        2. Documenting Your Code
        3. Decomposition
        4. Naming
        5. Using Language Features with Style
        6. Formatting
        7. Stylistic Challenges
        8. Summary
    2. Part II: Professional C++ Software Design
      1. Chapter 4: Designing Professional C++ Programs
        1. What Is Programming Design?
        2. The Importance of Programming Design
        3. Designing for C++
        4. Two Rules for C++ Design
        5. Reusing Code
        6. Designing with Patterns and Techniques
        7. Designing a Chess Program
        8. Summary
      2. Chapter 5: Designing with Objects
        1. Am I Thinking Procedurally?
        2. The Object-Oriented Philosophy
        3. Living in a World of Objects
        4. Object Relationships
        5. Abstraction
        6. Summary
      3. Chapter 6: Designing for Reuse
        1. The Reuse Philosophy
        2. How to Design Reusable Code
        3. Summary
    3. Part III: Coding the Professional Way
      1. Chapter 7: Gaining Proficiency with Classes and Objects
        1. Introducing the Spreadsheet Example
        2. Writing Classes
        3. Object Life Cycles
        4. Summary
      2. Chapter 8: Mastering Classes and Objects
        1. Dynamic Memory Allocation in Objects
        2. Different Kinds of Data Members
        3. More about Methods
        4. Nested Classes
        5. Enumerated Types Inside Classes
        6. Friends
        7. Operator Overloading
        8. Building Stable Interfaces
        9. Summary
      3. Chapter 9: Discovering Inheritance Techniques
        1. Building Classes with Inheritance
        2. Inheritance for Reuse
        3. Respect Your Parents
        4. Inheritance for Polymorphism
        5. Multiple Inheritance
        6. Interesting and Obscure Inheritance Issues
        7. Summary
      4. Chapter 10: C++ Quirks, Oddities, and Incidentals
        1. References
        2. Keyword Confusion
        3. Types and Casts
        4. Scope Resolution
        5. C++11 / C++14
        6. Header Files
        7. C Utilities
        8. Summary
      5. Chapter 11: Writing Generic Code with Templates
        1. Overview of Templates
        2. Class Templates
        3. Function Templates
        4. Variable Templates
        5. Summary
      6. Chapter 12: Demystifying C++ I/O
        1. Using Streams
        2. String Streams
        3. File Streams
        4. Bidirectional I/O
        5. Summary
      7. Chapter 13: Handling Errors
        1. Errors and Exceptions
        2. Exception Mechanics
        3. Exceptions and Polymorphism
        4. Stack Unwinding and Cleanup
        5. Common Error-Handling Issues
        6. Putting It All Together
        7. Summary
      8. Chapter 14: Overloading C++ Operators
        1. Overview of Operator Overloading
        2. Overloading the Arithmetic Operators
        3. Overloading the Bitwise and Binary Logical Operators
        4. Overloading the Insertion and Extraction Operators
        5. Overloading the Subscripting Operator
        6. Overloading the Function Call Operator
        7. Overloading the Dereferencing Operators
        8. Writing Conversion Operators
        9. Overloading the Memory Allocation and Deallocation Operators
        10. Summary
      9. Chapter 15: Overview of the C++ Standard Library
        1. Coding Principles
        2. Overview of the C++ Standard Library
        3. Summary
      10. Chapter 16: Understanding Containers and Iterators
        1. Containers Overview
        2. Sequential Containers
        3. Container Adapters
        4. Associative Containers
        5. Unordered Associative Containers/Hash Tables
        6. Other Containers
        7. Summary
      11. Chapter 17: Mastering STL Algorithms
        1. Overview of Algorithms
        2. Lambda Expressions
        3. Function Objects
        4. Algorithm Details
        5. Algorithms Example: Auditing Voter Registrations
        6. Summary
      12. Chapter 18: String Localization and Regular Expressions
        1. Localization
        2. Regular Expressions
        3. Summary
      13. Chapter 19: Additional Library Utilities
        1. std::function
        2. Ratios
        3. The Chrono Library
        4. Random Number Generation
        5. Tuples
        6. Summary
    4. Part IV: Mastering Advanced Features of C++
      1. Chapter 20: Customizing and Extending the STL
        1. Allocators
        2. Iterator Adapters
        3. Extending the STL
        4. Summary
      2. Chapter 21: Advanced Templates
        1. More about Template Parameters
        2. Class Template Partial Specialization
        3. Emulating Function Partial Specialization with Overloading
        4. Template Recursion
        5. Type Inference
        6. Variadic Templates
        7. Metaprogramming
        8. Summary
      3. Chapter 22: Memory Management
        1. Working with Dynamic Memory
        2. Array-Pointer Duality
        3. Low-Level Memory Operations
        4. Smart Pointers
        5. Common Memory Pitfalls
        6. Summary
      4. Chapter 23: Multithreaded Programming with C++
        1. Introduction
        2. Threads
        3. Atomic Operations Library
        4. Mutual Exclusion
        5. Condition Variables
        6. Futures
        7. Example: Multithreaded Logger Class
        8. Thread Pools
        9. Threading Design and Best Practices
        10. Summary
    5. Part V: C++ Software Engineering
      1. Chapter 24: Maximizing Software Engineering Methods
        1. The Need for Process
        2. Software Life Cycle Models
        3. Software Engineering Methodologies
        4. Building Your Own Process and Methodology
        5. Source Code Control
        6. Summary
      2. Chapter 25: Writing Efficient C++
        1. Overview of Performance and Efficiency
        2. Language-Level Efficiency
        3. Design-Level Efficiency
        4. Profiling
        5. Summary
      3. Chapter 26: Conquering Debugging
        1. The Fundamental Law of Debugging
        2. Bug Taxonomies
        3. Avoiding Bugs
        4. Planning for Bugs
        5. Debugging Techniques
        6. Summary
    6. Appendix A: C++ Interviews
    7. Appendix B: Annotated Bibliography
    8. Appendix C: Standard Library Header Files
    9. Introduction
    10. Advertisement
    11. End User License Agreement

    Product information

    • Title: Professional C++, 3rd Edition
    • Author(s):
    • Release date: September 2014
    • Publisher(s): Wrox
    • ISBN: 9781118858059