Complete Modern C++ (C++11/14/17)
4.5 (2,033 ratings)
Course Ratings are calculated from individual students’ ratings and a variety of other signals, like age of rating and reliability, to ensure that they reflect course quality fairly and accurately.
10,078 students enrolled

Complete Modern C++ (C++11/14/17)

The most comprehensive C++ tutorial with C++11/14/17 features
4.4 (2,036 ratings)
Course Ratings are calculated from individual students’ ratings and a variety of other signals, like age of rating and reliability, to ensure that they reflect course quality fairly and accurately.
10,086 students enrolled
Created by Umar Lone
Last updated 8/2020
English
English
Current price: $139.99 Original price: $199.99 Discount: 30% off
5 hours left at this price!
30-Day Money-Back Guarantee
This course includes
  • 18 hours on-demand video
  • 29 articles
  • 70 downloadable resources
  • Full lifetime access
  • Access on mobile and TV
  • Certificate of Completion
Training 5 or more people?

Get your team access to 4,000+ top Udemy courses anytime, anywhere.

Try Udemy for Business
What you'll learn
  • Use C++ as an object-oriented language
  • Demystify function & class templates
  • Use STL components in your applications
  • Write real-world applications in C++
  • Apply Modern C++ (C++11/14/17) in programs
Course content
Expand all 217 lectures 18:19:49
+ Start Here
8 lectures 25:00

This video gives an introduction of your instructor. It also gives an overview of the course content and the target audience.

Preview 03:01

A note on different C++ compilers

Required software
00:22

This lecture shows the installation process of Visual Studio for C++ programming

Visual Studio 2015 Installation
04:32

In this video, you 'll learn how to install Visual Studio 2017 and also how to create a C++ project. I also explain a few differences between VS2015 & VS 2017 in the project creation dialogs. Note that the installation for Visual Studio 2019 is same as Visual Studio 2017.

Visual Studio 2017 Installation
02:44

[UPDATE] A new version of Code::Blocks was recently released. The MingW compiler bundled now supports all C++11/14 features, however, some C++17 features may be missing. If you don't care about C++17 now, just download the entire package with compiler. Otherwise, follow the instructions in the video & install the compiler separately.

In this video,I'll explain how to install Code::Blocks and configure it with a separate build of MingW on Windows.

Code::Blocks Installation
05:06

In this video, I'll explain how to install Cevelop. Cevelop is an enhanced version of Eclipse CDT and focuses on modern C++ development.

I'll also demonstrate how to create a project in Cevelop and how to add new classes to existing project.

Note: To run Cevelop, you'll have to install Java runtime & a GNU-based C++ compiler. You can download Java from www.java.com and MinGW from mingw.org.

Cevelop Installation
05:31

In this lecture, I'll show you how to download, install and use XCode on MacOS for creating C++ programs

XCode Installation on MacOS
03:32
Course Slides
00:11
+ Basic Language Facilities
25 lectures 02:29:06

Introduces Modern C++ and where it is used. It explains why C++ is chosen over other languages.

Preview 03:31

This video explains the structure of the first C++ program. It also gives an overview of compilation in Visual Studio.

First C++ Program
09:12

Explains the C++ build process in detail.

The C++ Compilation Process
03:09

Introduces primitive types in C++.

Primitive Types & Variables
07:57

Gives overview of basic input/output classes and demonstrates how to write on the console & read from the keyboard.

Basic Input/Output
05:56

This lecture explains the basics of functions in C++.

Functions Basics - Part I
09:13

I'll discuss the concept of function declaration & definition. And we'll see some more examples of functions.

Functions Basics - Part II
09:05

Gives a gentle introduction to debugging  C++ applications in Visual Studio and also explains a few common shortcuts.

Overview of Debugging in Visual Studio
05:40

Learn about different types of initialization in C++ including the new Uniform Initialization syntax and its advantages

Preview 09:21

Introduces pointers, syntax and their usage.

Pointers
08:18

Tests your understanding of pointers and their syntax.

Assignment
00:17

Explains reference type and how to use it instead of pointers.

Reference
05:32

Test your understanding of references.

Assignment
00:12

Compares pointers and references and explains how to choose between them

Reference Vs Pointer
06:58

Explains the importance of const qualifier and its usage.

The const Qualifier
04:19

Explains how to use const qualifier with pointers and references.

const Qualifer & Compound Types
07:30

Test your understanding of using const qualifier with pointers and references

Assignment
00:23

Introduces the auto keyword and explains how to use it to infer types automatically.

Automatic Type Inference (C++11)
07:00

This will help you gauge your understanding of the topics learned so far.

Basics Quiz - I
5 questions

Introduces the new range-based for loop in C++11 and explains how to use it.

Range-Based For Loop - I (C++11)
04:32

In this lecture, you'll understand how the range-based for loop works internally.

Range-Based For Loop - II (C++11)
06:18

Explains function overloading and how to use it 

Preview 09:07

Another convenience feature for programmers. This video explains syntax and usage

Default Function Arguments
03:43

Explains how to increase performance of your code by making your functions inline

Inline Functions
07:36

Introduces function pointers and explains their purpose.

Function Pointers
04:53

Explains how to use namespaces to group types together and avoid name clashes

Namespace
09:24

This quiz will further test your knowledge of the previous topics.

Basics Quiz - II
7 questions
+ Memory Management - Part I
5 lectures 27:44

Explains basics of dynamic memory allocation in C. This will build up a base for understanding dynamic memory allocation in C++.

Dynamic Memory Allocation - Part I (malloc function)
09:36

Learn how to use the new operator to allocate memory at runtime in C++. You'll also learn why new operator is preferred over malloc in C++.

Dynamic Memory Allocation - Part II (new operator)
06:19

This lecture explains how to create arrays on heap using new [] operator. You'll also learn how to create strings on heap in C++.

Dynamic Memory Allocation - Part III (new[] operator)
06:40

Learn the basics of 2D arrays and how they're created on the heap in C++ using the new[] operator.

Dynamic Memory Allocation - Part IV (2D arrays)
05:07

Source code only

Dynamic Memory Allocation - Source Code Only
00:02
+ Classes & Objects
17 lectures 01:26:24

Gives an overview of Object Oriented programming principles and how they relate to real-life objects.

Object Oriented Programming Basics
05:50

Explains the meaning and syntax of class

Class
05:31

Explains the purpose of constructors and destructor and how they can be used to manage object initialization.

Constructor & Destructor
04:28

Explains the meaning and purpose of structures in C++

Structures
02:38

Explains this C++11 feature and shows how to use it to initialize class members directly inside a class.

Non-static Data Member Initializers (C++11)
04:39

Explains this pointer and its purpose

this Pointer
04:46

Explains how to create read-only functions through the const qualifier

Constant Member Functions
03:14

Explains how to use the static keyword to create static member variables & functions

Static Class Members
05:12

Explains the copy constructor and why it is required

Copy Constructor - Part I
04:52

Explains how & when to implement a user-defined copy constructor. Also explains the rule of 3.

Copy Constructor - Part II
04:40

This quiz will test your understanding of classes, constructors, destructors and copy semantics

Quiz I
8 questions

Explains the C++11 feature of delegating constructors and how it can be used to prevent code duplication in constructors.

Delegating Constructors (C++11)
04:01

Explains how to use the C++11 keywords, default & delete, to control what functions are synthesized by the compiler.

Default & Deleted Functions (C++11)
05:18

This lecture starts with the basics of l-values and r-values and then explains C++11 feature, R-value references.

Preview 07:10

Explains the concept of move semantics and how it improves performance.

Move Semantics - Basics (C++11)
03:23

Shows how to implement move semantics in a class. Also explains the rule of 5.

Move Semantics - Implementation (C++11)
04:19

Learn about copy elision and how it eliminates extra copies of temporary objects.

Copy Elision
08:31

Shows how to use std::move function to force move semantics on l-value

Move Semantics - std::move Function (C++11)
07:52

This quiz will test your understanding of move semantics and the new keywords (default, delete)

Quiz II
7 questions
+ Operator Overloading
12 lectures 52:24

Contains source code only.

Operator Overloading Demo Code
00:05

Explains the basics of operator overloading and implementation of common unary & binary operators

Operator Overloading - Part I (Basics)
08:28

Explains why assignment operator is important

Operator Overloading - Part II (Assignment Operator)
04:18

Shows when operators need to be overloaded as global functions. Also shows implementation of overloaded stream operators (<< and >>).

Operator Overloading - Part III (Global Overloads)
05:48

Explains the purpose of friend keyword and when & where to use it.

Operator Overloading - Part IV (Friend Keyword)
02:29

Explains the RAII idiom (Resource Acquisition Is Initialization). Shows how to overload -> and * operator to create a smart pointer.

Operator Overloading - Part V (Smart Pointer Basics)
05:04

Demonstration of the smart pointers in C++11 (std::unique_ptr & std::shared_ptr)

Go to Section 6 for in-depth explanation of C++11 smart pointers.

Operator Overloading - Part VI (Smart Pointers in C++11)
04:34

A short discussion on the operator overloading rules.

Operator Overloading - Part VII (Rules)
01:55

Discussion on conversion between types using C++ casting operators

Type Conversions - Part I (Basics)
05:56

Explanation & implementation of how constructors are used by the compiler to perform type conversion.

Type Conversions - Part II (Primitive to User Type)
05:39

Explains how to implement type conversion operator function to convert a user-defined type into primitive type.

Type Conversions - Part III (User to Primitive Type)
02:50

Explains why initialization should be preferred over assignment. Also explains the concept of member initializer list.

Initialization Vs. Assignment & Member Initialization List
05:18

This will test your understanding of operator overloading & type conversions.

Quiz
8 questions
+ Memory Management - Part II
6 lectures 51:31

In this lecture, I'll explain why we need smart pointers.

Smart Pointers - I
05:11

You'll learn about the unique_ptr and its properties in this video.

Smart Pointers - II
10:11

unique_ptr cannot be used everywhere. If the underlying pointer has to be passed around in the code, then you've to use shared_ptr. This lecture explains the rationale behind using it.

Smart Pointers - III
10:27

We'll look at a problem with shared_ptr while using a resource that may be destroyed anytime.

Smart Pointers - IV
08:49

Continuing from the previous lecture, you'll learn how weak_ptr can be used to weakly point to a resource without preventing it from getting destroyed.

Smart Pointers - V
06:26

In this lecture, we'll learn about circular references and how using shared_ptr may lead to memory leaks. Finally, we'll use weak_ptr to prevent memory leaks.

Smart Pointers - VI
10:27
+ More C++ Goodies
13 lectures 01:13:12

Explains the purpose of enumerated types and when to use them.

Enums - Part I (Basics)
03:42

Implementation of scoped enums.

Enums - Part II (Scoped Enums C++11)
05:32

Demonstrates raw string and their usage. You get to learn why raw strings should be avoided.

Strings - Part I (Raw Strings)
06:49

Introduces std::string class from the standard library and its usage.

Strings - Part II (std::string)
10:05

Assignment on string conversion.

Assignment I
00:14

Explains string streams and their purpose. Also introduces the new string conversion functions of C++11.

Strings - Part III (String Streams)
09:45

Coding assignment on std::string

Assignment II
00:24

You'll learn how to write expressions that can be evaluated at compile time, thereby increasing the performance of your code.

Constant Expressions - constexpr (C++11)
09:24

This video discusses the purpose of std::initializer_list in depth.

std::initializer_list (C++11)
08:27

Introduces the std::vector class and demonstrates common operations of creation, insertion, deletion, etc.

Dynamic Array (std::vector)
08:43
Assignment III
00:19

Test your understanding on enums, strings, stringstreams & vector

Quiz
5 questions

This lecture explains basics of unions and how to use them.

Union - I
04:51

In this lecture, we'll see the caveats of using user-defined types as members in a union.

Union - II
04:56
+ Object Oriented Programming
16 lectures 01:23:01

Source code of Account classes

Account Hierarchy Source Code
00:06

We revisit inheritance and composition and explain it again with examples. This will give you a better understanding of these concepts.

Inheritance & Composition
06:01

Explains access modifiers in context of inheritance.

Inheritance & Access Modifiers
03:55

Explains the project on inheritance, that we'll implement in the subsequent videos.

Project - Part I (Beginning)
02:06

Implementation of the Account hierarchy

Project - Part II (Account & Savings Implementation)
06:59

Assignment

Project - Part III (Assignment)
00:14

This video implements the Checking class. Shows how to invoke the base class member functions from the child classes. Also explains the inheriting constructors from C++11 and where to use them. 

Project - Part IV (Inheriting Constructors of C++11)
06:31

Introduces the virtual keyword and why it is needed.

Project - Part V (Virtual Keyword)
08:53

This part will test your understanding of basic concepts of inheritance.

Quiz I
6 questions

Explains the underlying implementation of virtual mechanism

Project - Part VI (Virtual Mechanism Internals)
07:11

This video walks through the code that is generated for virtual functions in Visual Studio. It also explains why base class destructors should be virtual.

Preview 06:42

This lecture explains the purpose of override & final specifier.

Project - Part VIII (override & final specifier in C++11)
06:13

Discussion on upcasting & downcasting within the objects of a class hierarchy

Project - Part IX (Upcasting & Downcasting)
02:16

This video explains the concepts of Run-time type Information and also introduces the typeid operator

Project - Part X (RTTI Basics)
07:11

This video explains the purpose of dynamic_cast operator & how to use it.

Project - Part XI (RTTI Operators)
03:17

Understand the concept of pure virtual functions and the abstract classes and learn when and where to use them.

Abstract Class
06:03

This video explains the issue that arises with diamond inheritance. You'll learn how to solve it by virtual inheritance and how it is implemented internally.

Multiple (Diamond) Inheritance
09:22

This quiz will test your understanding of virtual mechanism, virtual inheritance & RTTI.

Quiz II
5 questions
+ Exception Handling
6 lectures 39:05

Explains why exception handling is required and how it is better than returning simple error codes.

Exception Handling - Part I (Basics)
07:59

This video explains more details on catch blocks.

  1. Writing multiple catch blocks
  2. Using base exception object in a catch block
  3. All catch block
Exception Handling - Part II (Multiple Catch Blocks)
03:58

This video explains the concept of stack unwinding. It also explains the pitfalls of manual memory management with exception handling..

Exception Handling - Part III (Stack Unwinding)
06:31

Explains the concept of nested exception handling and demonstrates its usage with an example.

Exception Handling - Part IV (Nested Exceptions)
05:11

This video explains exception handling in context of constructors and destructors.

Exception Handling - Part V (Constructor & Destructor)
07:06

Introduces the noexcept keyword. We learn its purpose and where it should be used.

Exception Handling - Part VI - (noexcept keyword in C++11)
08:20

Test your knowledge & understanding of exception handling.

Quiz
4 questions
+ File Input & Output
10 lectures 40:23

Introduces the C++11 raw string literals and explains their purpose & usage. 

Raw String Literals (C++11)
04:03

This video gives a glimpse of the features of the filesystem library from the C++17 standard.
Note: Filesystem library components are discussed in depth in the section titled "New Standard Library Components".

Introduction to Filesystem Library (C++17) (DEPRECATED)
03:49

Introduction to basic file I/O. Demonstrates reading and writing of data into text files.

File IO - Part I (Basics)
06:44

This lecture shows how to handle errors during file I/O through stream state flags.

File IO - Part II (Error Handling)
05:43

Uses file I/O to create a utility that copies text files.

File IO - Part III (Copy Utility)
03:29

This video explains the following: 

  1. How to perform character I/O with streams
  2. Jumping to random locations in a file through seek functions
  3. Using std::fstream class to perform I/O on the same file.
File IO - Part IV (Character IO & Seeking)
07:22

In this video, we learn how to perform binary input/output operations on files.

File IO - Part V (Binary IO)
08:30

Assignment on file copy utility

Assignment I
00:22

Additions to the earlier assignment.

Assignment II
00:15

File copy utility source files.

File Copy Utility Source
00:05

This quiz will test your understanding of file I/O concepts.

File IO
4 questions
Requirements
  • Basic programming knowledge in any computer language
  • Some experience of writing programs in any language
  • Modern C++ compiler, preferably Visual Studio 2015/17/19 Community (or XCode, Clang, g++, Cevelop, Eclipse CDT, Code::Blocks)
Description

Learn C++ in depth with modern features introduced with C++11/14/17

Updated with C++17 features!

C++ is a general purpose programming language invented by Bjarne Stroustrup. It is still one of the more popular programming languages, used for creating high performance applications across a wide variety of domains & platforms.

In 2011, C++11 was born. This revision added lot of new features to the language and it got a new name, Modern C++. This emphasizes writing C++ code using modern features of the language such as move semantics, automatic type inference, threading, lambda expressions, smart pointers and a lot more. C++11 was followed by C++14, that added even more features and enhanced existing onces. In 2017, we may see a new release called C++17, that will add a filesystem library (covered in the course), parallel versions of STL algorithms, new library types such as std::optional, std::any and more.

This course teaches C++ as an object oriented language with modern features. It focuses on teaching C++ concepts, both old and new, with clear examples. It builds upon the basic language facilities that are then used to build more complex programs with classes, operator overloading, composition, inheritance, polymorphism, templates, concurrency, etc. It even digs deep into assembly to understand few concepts better. After every few topics, a quiz is presented that tests your understanding of the previous topics. Have fun learning Modern C++.

Note that this course is not for you if

  1. You have never programmed before

  2. You don't know ANY programming language

  3. You want to learn basics of programming

Update [April 19, 2020] : Biggest update so far. Added C++17 core language changes, template enhancement and new library types.

Update [April 11, 2020] : Added content on copy elision, type traits, static_assert & generalized lambda capture, C++11 unions

Update [Mar 25, 2020]: XCode installation & high-level concurrency (std::async)

Update [Mar 1, 2019] : More videos added for memory management with smart pointers (shared_ptr, unique_ptr, weak_ptr

Update [Oct 19, 2017] :Instructions added for installing Visual Studio Community 2017, Cevelop (Eclipse) & Code::Blocks

Update [Sep 29, 2107] : Added more content on dynamic memory allocation (malloc, new[], 2D arrays, strings)

Update [Sep 16, 2017] : C++ concurrency (std::thread, std::mutex, etc)

Update [April 27, 2017] : Templates, Function Object, Lambda Expressions, Standard Template Library

Update [Mar 23, 2017] : Virtual Inheritance, Exception handling, File I/O, std::filesystem (C++17)

Update [Mar 4, 2017] : Strings, stringstreams, enums, inheritance, polymorphism

Update [Feb 25, 2017] : Source Code of existing topics added

Who this course is for:
  • College students who want to learn Modern C++
  • Expert C++ developers who want to migrate to Modern C++
  • C++ developers with varying level of experience, who want to refresh basics of the C++ language and get acquainted with the new features
  • Software professionals who want to learn & implement Modern C++
  • Anyone who is comfortable with other languages like C, Java, C#, Python, etc, and wants to learn & apply Modern C++
  • Anyone interested in learning C++