Book Image

Learn By Example: C++ Programming - 75 Solved Problems [Video]

By : Janani Ravi
1 (1)
Book Image

Learn By Example: C++ Programming - 75 Solved Problems [Video]

1 (1)
By: Janani Ravi

Overview of this book

Like a gruff uncle, C++ seems intimidating, when it’s just being helpful. These 75 examples will help you understand that. Let's parse that. C++ seems intimidating because all too often, what you see is not what you get. Usually, that's because C++ is trying to help you, but you don't realize that. This section is moving to C++ from C: If you are a C programmer, will run through what you need to know in order to move seamlessly to C++. Objects, Classes and Object-Oriented Programming: Access modifiers, classes, objects, the this pointer, new/delete and dynamic memory allocation gotchas. Operator overloading is a particularly complicated topic - C++ is virtually alone in the ubiquity of overloaded operators. Make sure this doesn't trip you up. Also go deep into the workings of const, static and friend. Inheritance in C++ is considerably more complicated than in Java, mostly because of multiple inheritances, and because of the co-existence of both virtual and non-virtual methods. Templates are a classic generic programming technique that was revolutionary when first added to C++. Understand template functions and classes, as well as template specializations. STL - the Standard Template Library - is incredibly powerful. Get a good sense of collections, iterators and algorithms - the major components of the STL. C++ casts are quite different than C-casts. Understand const_cast, static_cast and dynamic_cast, as well as Real Time Type Identification (RTTI), and the manner in which explicit conversions can be performed using static_cast. Exceptions and exception handling in C++.
Table of Contents (16 chapters)
Free Chapter
1
Introducing C++
Chapter 11
Operator Overloading
Content Locked
Section 3
Example 44: Overloading the += operator
All the nitty gritty details to get the += correct. With operator overloading the function signatures are the most complicated, pay close attention to those.