C++ Classes, Constructors, and the Rule of Three
Design C++ classes with constructors, destructors, member initializer lists, and the Rule of Three and Five to manage resources safely.
10 posts.
Design C++ classes with constructors, destructors, member initializer lists, and the Rule of Three and Five to manage resources safely.
Master C++ control flow with if-else, for and range-for loops, while, do-while, switch, and the modern init-statement syntax for conditions.
Write C++ functions that pass data correctly: by value, by reference, by const reference, with overloading, default arguments, and clear ownership.
Set up a modern C++ toolchain on macOS, Linux, or Windows, then compile and run your first program with g++ or clang++ from the command line.
Tour the modern C++ features that pay back every day: auto, range-for, structured bindings, if-init, std::optional, and string_view.
Learn C++ pointers, the stack vs the heap, new and delete, nullptr, pointer arithmetic, and why modern C++ pushes you toward smart pointers.
Use unique_ptr, shared_ptr, and weak_ptr to model ownership in modern C++ without manual new and delete or memory leaks.
Pick the right C++ STL container for the job: vector, deque, list, map, set, unordered_map, and unordered_set with their complexity guarantees.
Learn C++ templates from scratch: function templates, class templates, type deduction, specialization, and how the compiler stamps out concrete code.
Understand C++ fundamental types, fixed-width integers, floating point, char, bool, const, and how initialization actually works in modern C++.