This course will teach you the fundamentals of the C++ programming language, with a focus on Modern C++ features and the efficient use of tools. Start with the fundamentals and work your way up to advanced C++11 concepts and OOP mastery!
Here are some of the things we are going to cover:
This lecture introduces you to the entire course. This is where you get to find out what the course is all about, how it's structured and what it actually covers.
What is this beast we call C++? Why is it worth learning C++ as opposed to C#, Java or <insert fancy language here>?
Let's talk about the industries that use C++ most, and why they are using it.
This lecture discusses the new term Modern C++ which refers, roughly, to the C++11 and later standards of the language.
The tool that turns your code into an actual program is called a compiler, and there are lots of C++ compilers out there.
Making an application is not easy, which is why build systems exist - they help us put together all the necessary parts to produce the final product. Build systems can be local or distributed (i.e., use more than one computer).
If you want to use code that someone else has written, or share your code to be reused, you will be working with libraries. There are two types of libraries - static and dynamic.
Integrated Development Environments (IDEs) make life a lot easier.
A look at a REPL (read-eval-print-loop) environment for C++.
What is source code, exactly?
The preprocessor is a nasty, archaic part of the compilation process. But, for now, there's no way of avoiding it.
Finally, the process of turning source code into something useful... object files!
Once you have all your object files, you can link them together to produce an executable or a library.
A bonus video on using Cling for scripting... if you are starting with C++, you totally must get yourself Cling. It's just that good.
We discuss the notion of a type system, what it means to work with a statically typed language, and the difference between built-in and user-defined types.
Variables store data. Simple as that.
These data types store whole numbers, like -42 or 1 million. But there are lots of them, they can be signed or unsigned, and C++ has plenty of issues with representing integral types consistently.
Different symbols such as + or / that can operate on numbers.
Finally, non-whole numbers! And things are a little simpler here than with integers.
What happens when you add an int and a float? There are rules for this!
The auto keyword saves a lot of effort. And now is as good a time as any to become familiar with it.
A few words about where you can find common mathematical operations, complex number support, and a word about the different math libraries that are out there.
We take a look at logical (boolean) types and the two special values `true` and `false`.
We look at how to compare values using operators such as `<`, `!=` and others.
We look at how conditions can be grouped using `&&` (AND), `||` (OR) and other operators.
What is a scope and why should you care?
A look at how to execute code conditionally with the `if-then-else` construct. Also we discuss the ternary `?:` operator that can offer a shorter alternative.
The `switch` makes it easier to check a value against several discrete cases. The `break` lets you jump out of various control flow constructs.
The `while` loop lets you execute the associated code block while a condition holds.
The most versatile loop of them all.
Some questions on your understanding of Control Flow concepts.
We discuss some of the memory areas that are used by a typical C++ program.
We discuss the Stack, which is an area of memory for statically allocated objects of known size.
We discuss the Heap, an area of memory used for dynamic allocation.
Pointers are variables which store memory addresses, i.e., point to other variables.
References refer to other variables. Their syntax is different (and arguably simpler) than that of pointers.
Some quesitons about memory management.
Arrays are nice and useful.
A discussion of how to go through all the elements in the array.
How to make 2D arrays on the stack on the heap. Extensible to arrays of any dimension.
A more user-friendly array class from the Standard Library.
An extensible array type that you should be using for just about every situation where a collection of same-type elements needs to be stored.
We look at how to store textual information in C++.
Standard Library comes to the rescue with a string type we can actually use.
A look at some useful things you can do with an std::string.
Another badly defined piece of the C++ text handling puzzle. Nothing to do with Unicode.
What are functions and why do we need them?
A note on function return types. What if a function doesn't return anything?
The function that gets called first in every executable.
How to get a pointer to a function?
The pinnacle of human achievment: lambda functions.
Learn how to make neat aliases for existing types.
Learn how to represent categorical variables using enumerations.
A single area of memory can be treated simultaneously as different data types. This is what unions are for.
Finally, a custom data type with members!
A note that UDTs can contain other UDTs ad infinitum.
We've met member variables (a.k.a. fields) before, but what are member functions?
A class is almost the same as a struct. No, really!
A constructor is a member function that gets called when the class is, err, constructed.
Called when the class is destroyed, this is the exact opposite of a constructor.
The ability to automagically acquire another class' fields and functions. No pillaging required.
An ability to inherit from several classes! You don't get this in C# or Java!
A way for classes to hide their members from the outside world.
A Polymorph spell turns a human into a frog. In C++, polymorphism lets derived classes be treated as their parents.
A useful operator for figuring out if an object is of a particular type.
Dmitri Nesteruk is a developer, speaker and podcaster. His interests lie in software development and integration practices in the areas of computation, quantitative finance and algorithmic trading. His technological interests include C#, F# and C++ programming as well high-performance computing using technologies such as CUDA. He has been a C# MVP since 2009.
Dmitri is a graduate of University of Southampton (B.Sc. Computer Science) where he currently holds a position as a Visiting Researcher. He is also an instructor on an online intro-level Quantitative Finance course, and has also made online video courses on CUDA, MATLAB, D, the Boost libraries and other topics.