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

Preview in Mapt

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

Loonycorn

C++ will never seem intimidating again, once you're done with these examples.
Mapt Subscription
FREE
$20.83/m after trial
Video
$43.35
RRP $50.99
Save 14%
What do I get with a Mapt Pro subscription?
  • Unlimited access to all Packt’s 5,000+ eBooks and Videos
  • Early Access content, Progress Tracking, and Assessments
  • 1 Free eBook or Video to download and keep every month after trial
What do I get with an eBook?
  • Download this book in EPUB, PDF, MOBI formats
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
What do I get with Print & eBook?
  • Get a paperback copy of the book delivered to you
  • Download this book in EPUB, PDF, MOBI formats
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
What do I get with a Video?
  • Download this Video course in MP4 format
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
$0.00
$43.35
$29.99 p/m after trial
RRP $50.99
Subscription
Video
Start 14 Day Trial

Frequently bought together


Learn By Example: C++ Programming - 75 Solved Problems [Video] Book Cover
Learn By Example: C++ Programming - 75 Solved Problems [Video]
$ 50.99
$ 43.35
Learn By Example: Hadoop, MapReduce for Big Data problems [Video] Book Cover
Learn By Example: Hadoop, MapReduce for Big Data problems [Video]
$ 49.99
$ 42.50
Buy 2 for $35.00
Save $65.98
Add to Cart

Video Details

ISBN 139781789137774
Course Length15 hours 52 minutes

Video Description

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++.

Style and Approach

These 75 examples will help. Each is self-contained, has its source code attached, and gets across a specific C++ use-case. Each example is simple, but not simplistic.

Table of Contents

Introducing C++
Introducing C++
Moving from C to C++
C and C++ - similar in some ways but actually very different
C vs C++: Comments are different - and oh C++ has namespaces!
Namespaces? Then we need a scope resolution operator
Not just function overloading, C++ allows operator overloading as well!
Default Values
References, Const and Bool
Objects and Classes
Classes mean different things to different people!
Classes - A logical grouping of data and functions
Example 1 and 2: Define a really simple C++ class and instantiate it
Example 3: Invoke the member functions of an object
Example 4 and 5: Setup and clean up using constructors and destructors
Example 6: Access Modifiers
Multi-file Programs
Example 7: Separating code into .cpp and .h files
Example 7: Setting up dependencies with multiple files
Dynamic Memory Allocation: new and delete
Dynamic Memory Allocation
C++ memory allocation explained
Stop using malloc and free
Do not mix new/delete for single variables with array equivalents new[]/delete[]
Example 8 and 9: Stop using malloc and free, use new and delete instead!
Example 10 and 11: Use new[] and delete [] for arrays - never mix new and new[]
Example 12: The Placement new operator and the "this" pointer
The C++ string Class
The C++ string class
Example 14: Strings
Example 15: Inputing multiline strings
Example 16: More common string operations
Example 17: Comparing strings
Example 18: Converting C++ to C strings (and vice versa)
References
The basic idea of references
Example 19, 20 and 21: A simple reference, a const reference, and C++ swap
Example 22, 23, 24, 25: Reference initialization, reassignment, aliasing, null
Example 26, 27, 28, 29: References to pointers, references as return types
The const Keyword
Example 30 and 31: The C++ const keyword
Example 32: const char* or char* const?
Example 33, 34, 35, 36: Const methods, mutable, overloading on const, const_cast
Passing function parameters const references
Example 37: Passing function parameters const references
The static Keyword
The basic idea of static in C++
Example 38: Static member variables
Example 39 and 40: Static member functions
Example 41: const static member variables
The friend Keyword
The basic idea of friends in C++
Example 42: Friend functions
Example 43: Friend classes
Operator Overloading
Understanding operator overloading - internal and external operators
Choosing between internal and external implementations
Example 44: Overloading the += operator
Example 45: Overloading the + operator
Example 46: Overloading the ++ (and --) operators
Example 47: Overloading the assignment operator
Operator Overloading - Streams Flashback
Example 48: Overloading the << and >> operators
Inheritance
Understanding inheritance - Flashback to objects and classes
Example 49 Understanding Inheritance
Inheritance Explained – I
Inheritance Explained – II
Example 49: Access levels and inheritance types
Example 49: Bringing all inheritance concepts together in code
Examples 50, 51, 52: Types of inheritance
Example 53: virtual functions
Example 53 (continued)
Example 54: pure virtual functions and abstract classes
Example 55: Multiple Inheritances, and a Diamond Hierarchy
Example 56: Virtual inheritance in a Diamond Hierarchy
Example 57: Object Slicing
Example 58: No virtual function calls in constructors or destructors!
Example 59: Virtual destructors rock!
Example 60: Why virtual functions should never have default parameters
Example 61: The strange phenomenon of name hiding
Example 62: Never redefine non-virtual base class methods
Templates
Templates as a form of generic programming
Example 63: A simple template function
Example 64: Overriding a default template instantiation
Example 65: A templated smart pointer class
Example 66: Template Specialization (partial or total)
STL - The Standard Template Library
Introducing the Standard Template Library
Example 67: The STL vector
Example 68: Iterators
Example 69: map, an associative container
Example 70: STL algorithms
C++ Casts
C++ casts are way cooler than C casts
Example 71: const_cast
Example 72: dynamic_cast, and RTTI
Example 73: static_cast, and the explicit keyword
Exceptions
Exception handling and burglar alarm
Example 74: Throwing exceptions
Example 75: Handling exceptions with try/catch

What You Will Learn

  • Harness the full power of C++ without being intimidated by the language's complexities
  • Use inheritance, operator overloading, templates, STL and all major C++ language features

Authors

Table of Contents

Introducing C++
Introducing C++
Moving from C to C++
C and C++ - similar in some ways but actually very different
C vs C++: Comments are different - and oh C++ has namespaces!
Namespaces? Then we need a scope resolution operator
Not just function overloading, C++ allows operator overloading as well!
Default Values
References, Const and Bool
Objects and Classes
Classes mean different things to different people!
Classes - A logical grouping of data and functions
Example 1 and 2: Define a really simple C++ class and instantiate it
Example 3: Invoke the member functions of an object
Example 4 and 5: Setup and clean up using constructors and destructors
Example 6: Access Modifiers
Multi-file Programs
Example 7: Separating code into .cpp and .h files
Example 7: Setting up dependencies with multiple files
Dynamic Memory Allocation: new and delete
Dynamic Memory Allocation
C++ memory allocation explained
Stop using malloc and free
Do not mix new/delete for single variables with array equivalents new[]/delete[]
Example 8 and 9: Stop using malloc and free, use new and delete instead!
Example 10 and 11: Use new[] and delete [] for arrays - never mix new and new[]
Example 12: The Placement new operator and the "this" pointer
The C++ string Class
The C++ string class
Example 14: Strings
Example 15: Inputing multiline strings
Example 16: More common string operations
Example 17: Comparing strings
Example 18: Converting C++ to C strings (and vice versa)
References
The basic idea of references
Example 19, 20 and 21: A simple reference, a const reference, and C++ swap
Example 22, 23, 24, 25: Reference initialization, reassignment, aliasing, null
Example 26, 27, 28, 29: References to pointers, references as return types
The const Keyword
Example 30 and 31: The C++ const keyword
Example 32: const char* or char* const?
Example 33, 34, 35, 36: Const methods, mutable, overloading on const, const_cast
Passing function parameters const references
Example 37: Passing function parameters const references
The static Keyword
The basic idea of static in C++
Example 38: Static member variables
Example 39 and 40: Static member functions
Example 41: const static member variables
The friend Keyword
The basic idea of friends in C++
Example 42: Friend functions
Example 43: Friend classes
Operator Overloading
Understanding operator overloading - internal and external operators
Choosing between internal and external implementations
Example 44: Overloading the += operator
Example 45: Overloading the + operator
Example 46: Overloading the ++ (and --) operators
Example 47: Overloading the assignment operator
Operator Overloading - Streams Flashback
Example 48: Overloading the << and >> operators
Inheritance
Understanding inheritance - Flashback to objects and classes
Example 49 Understanding Inheritance
Inheritance Explained – I
Inheritance Explained – II
Example 49: Access levels and inheritance types
Example 49: Bringing all inheritance concepts together in code
Examples 50, 51, 52: Types of inheritance
Example 53: virtual functions
Example 53 (continued)
Example 54: pure virtual functions and abstract classes
Example 55: Multiple Inheritances, and a Diamond Hierarchy
Example 56: Virtual inheritance in a Diamond Hierarchy
Example 57: Object Slicing
Example 58: No virtual function calls in constructors or destructors!
Example 59: Virtual destructors rock!
Example 60: Why virtual functions should never have default parameters
Example 61: The strange phenomenon of name hiding
Example 62: Never redefine non-virtual base class methods
Templates
Templates as a form of generic programming
Example 63: A simple template function
Example 64: Overriding a default template instantiation
Example 65: A templated smart pointer class
Example 66: Template Specialization (partial or total)
STL - The Standard Template Library
Introducing the Standard Template Library
Example 67: The STL vector
Example 68: Iterators
Example 69: map, an associative container
Example 70: STL algorithms
C++ Casts
C++ casts are way cooler than C casts
Example 71: const_cast
Example 72: dynamic_cast, and RTTI
Example 73: static_cast, and the explicit keyword
Exceptions
Exception handling and burglar alarm
Example 74: Throwing exceptions
Example 75: Handling exceptions with try/catch

Video Details

ISBN 139781789137774
Course Length15 hours 52 minutes
Read More

Read More Reviews

Recommended for You

Learn By Example: Hadoop, MapReduce for Big Data problems [Video] Book Cover
Learn By Example: Hadoop, MapReduce for Big Data problems [Video]
$ 49.99
$ 42.50
Learning Modern C++ Functional Programming [Video] Book Cover
Learning Modern C++ Functional Programming [Video]
$ 124.99
$ 106.25
Learn by Example: Python [Video] Book Cover
Learn by Example: Python [Video]
$ 98.99
$ 84.15
Machine Learning for OpenCV - Supervised Learning [Video] Book Cover
Machine Learning for OpenCV - Supervised Learning [Video]
$ 124.99
$ 106.25
Apache Kafka Series - Learn Apache Kafka for Beginners [Video] Book Cover
Apache Kafka Series - Learn Apache Kafka for Beginners [Video]
$ 47.99
$ 40.80
Apache Kafka Series - Kafka Streams for Data Processing [Video] Book Cover
Apache Kafka Series - Kafka Streams for Data Processing [Video]
$ 114.99
$ 97.75