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