Professional C++ - Gregoire, Marc (John Wiley & Sons, 2011)
Handling Copying and Assignment
Professional C++; Contents; Introduction; Part I: Introduction to Professional C++; Chapter 1: A Crash Course in C++; The Basics of C++; The Obligatory Hello, World; Namespaces; Variables; Operators; Types; Conditionals; Loops; Arrays; Functions; Those Are the Basics; Diving Deeper into C++; Pointers and Dynamic Memory; Strings in C++; References; Exceptions; The Many Uses of const; C++ as an Object- Oriented Language; Declaring a Class; The Standard Library; Your First Useful C++ Program; An Employee Records System; The Employee Class; The Database Class; The User Interface
Evaluating the ProgramSummary; Chapter 2: Designing Professional C++ Programs; What Is Programming Design?; The Importance of Programming Design; What's Different about C++ Design?; Two Rules for C++ Design; Abstraction; Reuse; Reusing Code; A Note on Terminology; Deciding Whether or Not to Reuse Code; Strategies for Reusing Code; Bundling Third-Party Applications; Open-Source Libraries; The C++ Standard Library; Designing with Patterns and Techniques; Designing a Chess Program; Requirements; Design Steps; Summary; Chapter 3: Designing With Objects; Am I Thinking Procedurally?
The Object-Oriented PhilosophyClasses; Components; Properties; Behaviors; Bringing It All Together; Living in a World of Objects; Overobjectification; Overly General Objects; Object Relationships; The Has-A Relationship; The Is-A Relationship (Inheritance); The Fine Line between Has-A and Is-A; The Not-A Relationship; Hierarchies; Multiple Inheritance; Mix-in Classes; Abstraction; Interface versus Implementation; Deciding on an Exposed Interface; Designing a Successful Abstraction; Summary; Chapter 4: Designing for Reuse; The Reuse Philosophy; How to Design Reusable Code; Use Abstraction
Structure Your Code for Optimal ReuseDesign Usable Interfaces; Reconciling Generality and Ease of Use; Summary; Chapter 5: Coding with Style; The Importance of Looking Good; Thinking Ahead; Elements of Good Style; Documenting Your Code; Reasons to Write Comments; Commenting Styles; Comments in This Book; Decomposition; Decomposition through Refactoring; Decomposition by Design; Decomposition in This Book; Naming; Choosing a Good Name; Naming Conventions; Using Language Features with Style; Use Constants; Use References Instead of Pointers; Use Custom Exceptions; Formatting
Keywords: C++ (Computer program language); Computer science; COMPUTERS / Programming Languages / C#; COMPUTERS / Programming Languages / Java; COMPUTERS / Programming Languages / Pascal; Informatik; C++