
Where to find the source code you see in the tutorials.
Learn how to catch exceptions in the correct order in C++, ensuring subclasses are caught before their parent classes to respect polymorphism, with examples using standard exceptions and derived ones.
Learn to read formatted text data from files in C++, using getline with delimiters, extract numbers with the stream operator, and handle whitespace and errors robustly.
Discover how vectors manage memory in C++, including size vs capacity and how capacity grows, with push_back, reserve, resize, and clear. Compare index-based loops and iterators for efficient iteration.
Explore C++ lists, a doubly linked list with insertions at the beginning or middle and erasing elements. Learn to use iterators, push front, and handle iterator invalidation after erase.
Explore maps in the C++ standard template library, storing unique key-value pairs, inserting and overwriting entries, and using iterators and find to test presence.
Explore using custom objects as map values with a Person class, including default constructors, initialization lists, and the nuances of copy construction and assignment in C++.
Learn how to use custom objects as keys in maps by overloading the less than operator, ensuring const correctness, and comparing name and age to manage keys and values.
Learn how multimaps store duplicate keys in C++, insert pairs, iterate with iterators, and retrieve value ranges with equal_range, highlighting differences from maps.
Explore stacks and queues in C++, comparing last-in, first-out with first-in, first-out. Learn push and pop, top and front access, and risks of invalidated references after pops.
Sort a vector of test objects in c++ with operator< or a comparator. Sort by name and by id using iterators, with friend access and deque usage.
Explore overloading the assignment operator in C++ by implementing operator equals as a method, returning a reference, and understanding shallow versus deep copies, copy constructors, and the rule of three.
Learn how to overload the left bit shift operator to print a test object with id and name using cout, via a friend function returning an upstream stream.
Overload the dereference operator to implement the complex conjugate, returning a new complex number with the imaginary part sign-flipped, while exploring operator precedence and bracket usage.
Learn that C++ templates require seeing implementation and definition together, so define template classes in header files and avoid dot cpp separation; understand instantiation with types like vector of strings.
Learn how template classes in C++ enable writing generic classes that store and manipulate user-specified types using a type parameter t, with examples like vector, stream insertion, and maps.
Explore object slicing and polymorphism in C++ by comparing non-virtual and virtual methods, showing how upcasting and copy construction can slice subclass data, and how a virtual destructor ensures cleanup.
Learn abstract classes and pure virtual functions in C++, preventing base instantiation while deriving concrete animals like dog from an animal base class; use pointers and polymorphism for unified handling.
Explore decltype and typeid in c++11, enable c++11 in your compiler with flags, include the type info header, and see how typeid exposes type information and name mangling.
Learn how to implement nested template classes in c++ using a ring buffer to support a range-based loop, and expose a compatible iterator for iteration.
Implement a template ring buffer class in a header file using a dynamic array. Add values with a wraparound parse index and return elements by index as references, without iterators.
Learn to make a ring buffer iterable by implementing begin and end, a nested iterator with ++ and * operators, enabling range-based for loops in C++98 and C++11.
Discover brace initialization in C++11, including initialization of vectors, arrays, strings, and pointers, the move from C++98, and the new nullptr keyword for pointers.
Learn how to initialize lists in C++11 with initializer lists, apply them in constructors and functions, and iterate braced values like {apple, orange, banana}.
Shows object initialization in C++11 using brace initialization and defaulted constructors via equals default, and explains how to delete copy and assignment to prevent copying.
Learn lambda expressions in c++11, including anonymous functions stored in auto and passed to functions via function pointers, with direct invocation and compiler enablement guidance.
Explore the standard function type in C++11, enabling any callable, including lambdas and function pointers, and use it with count_if on a string vector.
Explore the mutable keyword in C++ lambda expressions, learn how to modify a by-value captured variable inside a lambda, and see how copies change without altering the original.
Explore copy elision and return value optimization in C++ to understand how temporary objects are avoided in both C++98 and C++11, and preview move semantics.
Explore memory allocation in a class, including zeroing a buffer with memset or empty braces, move constructors, and copy constructors with memcpy, protecting against memory leaks with delete[].
Learn how rvalue references differentiate temporary and non-temporary values in C++, overload functions for lvalue and rvalue parameters, and boost performance with move semantics.
learn how move constructors in c++11 steal resources from a temporary rvalue, transferring the test object's p_buffer to the target and nulling the source so deletion on null is safe.
Learn how shared pointers in C++11 keep an object alive until all pointers go out of scope, contrasting them with unique pointers, and use make_shared for efficient creation.
Create a Mandelbrot fractal image in a hello-world C++11 project, write it to a bitmap file, explore binary bitmap formats and zoom capabilities, and study library creation.
Configure bitmap file header and info header, compute file size, data offset, width, height, and pixel data to create a bmp image.
Scale bitmap coordinates to minus one to plus one by applying offset and scaling to x fractal and y fractal, then track min and max values.
Implement a Mandelbrot fractal class in C++: static get_iterations and a max_iterations constant. Build a simple main loop to map iterations to color and highlight compilation checks.
Improve the Mandelbrot fractal's appearance by equalizing x and y scaling to prevent squashing, fit the image to the screen, and experiment with color mapping by squaring color values.
Color the fractal by using a histogram of per-pixel iteration counts to drive a hue-based RGB rendering after tallying total iterations.
Implement a stub zoom list class in C++, storing zooms in a vector, adding via ADD, and converting bitmap coordinates to fractal coordinates with do_zoom that returns a double pair.
Implement the fractal creator class and refactor the code to use member variables for width, height, zoom list, histogram, fractal, and bitmap, then initialize zooms, calculate total iterations, and draw.
Build a simple RGB color class in C++ with double red, green, and blue components, a constructor, and a minus operator, then apply it to fractal color gradients.
Use the RGB class to interpolate colors from a start color to an end color by computing the color difference for red, green, and blue. Move zoom handling to main.
Figure out which pixel range corresponds to its iteration count in a Mandelbrot fractal by implementing a get range function, using ranges, asserts, and debugging to prevent out-of-bounds access.
Apply range-based coloring to fractals by mapping range iterations to start and end colors using color differences and histogram data.
Explore advanced c++ fractal programming by tweaking Mandelbrot colors and iterations. Precompute data, optimize with profiling, draw with SDL, enable click-to-redraw and zoom, memory checks with val grind.
This course will take you from a basic knowledge of C++ to using more advanced features of the language. This course is for you if you want to deepen your basic knowledge of C++, you want to learn C++ 11 features, or you've taken my free beginners' C++ course and you're looking for the next step.
We'll start with a look at C++ file handling and move through STL, template classes, operator overloading, lambda expressions, move constructors and much more besides.
At the end of the course I'll show you how to create a program that generates fractal images, using a a few of the language features we've seen in the course and giving you a great work out with smart pointers and arrays.
I'll give you exercises throughout the course, ranging from easy near the start, to quite tricky (but optional!) near the end of the course.