C++ Programming: A Practical Approach

Book description

The book follows the approach of introducing a concept followed by providing an example and then brings out the intricacies of the topic by asking questions based on the example provided. Further, it exploits both teaching and industrial experience of the author and provides various complexities that arise in the real programming scenario.

Table of contents

  1. C++ Programming
    1. Copyright
    2. Dedication (1/2)
    3. Dedication (2/2)
    4. Foreword
    5. Preface
    6. About the Author
    7. Chapter 1: WELCOME TO C++
      1. 1.1 Introduction
      2. 1.2 Input/Output
      3. 1.3 Inline Function
      4. 1.4 Function Overloading (1/2)
      5. 1.4 Function Overloading (2/2)
      6. 1.5 scope resolution Operator
      7. 1.6 Reference Data Type
      8. 1.7 new and delete Operators
      9. 1.8 Guess the Output (1/2)
      10. 1.8 Guess the Output (2/2)
      11. 1.9 Points to Remember
      12. Exercises
    8. Chapter 2: CLASS (STRUCTURE++*)
      1. 2.1 Introduction
      2. 2.2 Journey from C Structure Towards C++ Class
      3. 2.3 Developing First C++ Class (1/2)
      4. 2.3 Developing First C++ Class (2/2)
      5. 2.4 More About Class and Object
      6. 2.5 C++ Structure/C Structure and Class
      7. 2.6 Array of Objects
      8. 2.7 Class: Interface and Implementation
      9. 2.8 Guess the Output (1/2)
      10. 2.8 Guess the Output (2/2)
      11. 2.9 Points to Remember
      12. 2.10 Deep Knowledge Section
      13. Exercises (1/2)
      14. Exercises (2/2)
    9. Chapter 3: CLASS FEATURES
      1. 3.1 Introduction
      2. 3.2 Constructor
      3. 3.3 Getter/Setter Methods
      4. 3.4 const Data Member
      5. 3.5 const Member Function
      6. 3.6 Static Class Members and Static Member Functions
      7. 3.7 More About Constructor (1/2)
      8. 3.7 More About Constructor (2/2)
      9. 3.8 Class with Pointer Attribute
      10. 3.9 Destructor
      11. 3.10 Copy Constructor
      12. 3.11 this Pointer
      13. 3.12 Assignment Operator
      14. 3.13 Friend Function and Friend Class (1/2)
      15. 3.13 Friend Function and Friend Class (2/2)
      16. 3.14 namespace (1/2)
      17. 3.14 namespace (2/2)
      18. 3.15 Guess the Output (1/2)
      19. 3.15 Guess the Output (2/2)
      20. 3.16 Points to Remember
      21. 3.17 Deep Knowledge Section (1/2)
      22. 3.17 Deep Knowledge Section (2/2)
      23. Exercises (1/2)
      24. Exercises (2/2)
    10. Chapter 4: OPERATOR OVERLOADING
      1. 4.1 Introduction
      2. 4.2 Operator Overloading (1/2)
      3. 4.2 Operator Overloading (2/2)
      4. 4.3 Operator Overloading and Polymorphism
      5. 4.4 operator Function as Non-member Function
      6. 4.5 Overloading Increment and Decrement Operators
      7. 4.6 More About new Keyword
      8. 4.7 Automatic/Implicit Conversions (1/2)
      9. 4.7 Automatic/Implicit Conversions (2/2)
      10. 4.8 Guess the Output
      11. 4.9 Points to Remember
      12. 4.10 Deep Knowledge Section
      13. Exercises
    11. Chapter 5: INHERITANCE
      1. 5.1 Introduction
      2. 5.2 Inheritance: What, When and Why?
      3. 5.3 Public Inheritance (1/2)
      4. 5.3 Public Inheritance (2/2)
      5. 5.4 Protected Access Specifier (1/2)
      6. 5.4 Protected Access Specifier (2/2)
      7. 5.5 Private Inheritance
      8. 5.6 Protected Inheritance
      9. 5.7 Composition
      10. 5.8 Virtual Inheritance: Solution to Diamond Problem (1/3)
      11. 5.8 Virtual Inheritance: Solution to Diamond Problem (2/3)
      12. 5.8 Virtual Inheritance: Solution to Diamond Problem (3/3)
      13. 5.9 Inheritance or Composition?
      14. 5.10 Composition and Aggregation
      15. 5.11 Advantages/Disadvantages of Inheritance
      16. 5.12 Guess the Output (1/2)
      17. 5.12 Guess the Output (2/2)
      18. 5.13 Points to Remember
      19. 5.14 Deep Knowledge Section
      20. Exercises (1/2)
      21. Exercises (2/2)
    12. Chapter 6: DYNAMIC POLYMORPHISM
      1. 6.1 Introduction
      2. 6.2 Dynamic Polymorphism: What, When and Why?
      3. 6.3 Virtual Destructor
      4. 6.4 Pure Virtual Function
      5. 6.5 Upcasting, Downcasting and Object Slicing
      6. 6.6 Guess the Output
      7. 6.7 Points to Remember
      8. 6.8 Deep Knowledge Section
      9. Exercises
    13. Chapter 7: GENERIC PROGRAMMING: TEMPLATES
      1. 7.1 Introduction
      2. 7.2 Templates: What, When and Why?
      3. 7.3 More About Templates (1/2)
      4. 7.3 More About Templates (2/2)
      5. 7.4 Template Advantages and Disadvantages
      6. 7.5 Points to Remember
      7. 7.6 Guess the Output
      8. Exercises
    14. Chapter 8: EXCEPTION HANDLING: SHOW MUST GO ON!
      1. 8.1 Introduction
      2. 8.2 Exception Handling: What, When and Why?
      3. 8.3 Exception Handling (1/2)
      4. 8.3 Exception Handling (2/2)
      5. 8.4 Exception Handling: Constructor (1/2)
      6. 8.4 Exception Handling: Constructor (2/2)
      7. 8.5 Exception Handling: Inheritance Class Hierarchy
      8. 8.6 Exception Handling: Destructor
      9. 8.7 bad_exception, set_unexpected, set_terminate
      10. 8.8 Guess the Output (1/3)
      11. 8.8 Guess the Output (2/3)
      12. 8.8 Guess the Output (3/3)
      13. 8.9 Points to Remember
      14. 8.10 Deep Knowledge Section
      15. Exercises (1/2)
      16. Exercises (2/2)
    15. Chapter 9: INPUT/OUTPUT
      1. 9.1 Introduction
      2. 9.2 C++ Input/Output: What, When and Why?
      3. 9.3 C++ Stream Class Hierarchy
      4. 9.4 C++ Stream Data Formatting
      5. 9.5 Manipulators (1/2)
      6. 9.5 Manipulators (2/2)
      7. 9.6 Guess the Output
      8. 9.7 Points to Remember
      9. Exercises
    16. Chapter 10: FILE INPUT/OUTPUT
      1. 10.1 Introduction
      2. 10.2 fstream Class
      3. 10.3 Writing into a File
      4. 10.4 Reading from a File
      5. 10.5 Random Access (1/3)
      6. 10.5 Random Access (2/3)
      7. 10.5 Random Access (3/3)
      8. 10.6 Guess the Output
      9. 10.7 Points to Remember
      10. Exercises
    17. Chapter 11: LAST WICKET!
      1. 11.1 Introduction
      2. 11.2 Why Smart Pointer?
      3. 11.3 Reference-Counting Mechanism
      4. 11.4 Smart Pointer and Copy Constructor (1/2)
      5. 11.4 Smart Pointer and Copy Constructor (2/2)
      6. 11.5 Templatized Smart Pointer Class (1/2)
      7. 11.5 Templatized Smart Pointer Class (2/2)
      8. 11.6 auto_ptr
      9. 11.7 Guess the Output
      10. Exercises
    18. Index

Product information

  • Title: C++ Programming: A Practical Approach
  • Author(s): Madhusudan Mothe
  • Release date: September 2011
  • Publisher(s): Pearson India
  • ISBN: 9788131760529