1. Object-Oriented Foundations in C++
C++ is built around four foundational principles of object-oriented programming: encapsulation, which bundles data and the functions that operate on it together; abstraction, which...
Read full chapter →The essential Cpp Programming cheat sheet: 8 concise chapters you can read in minutes, distilled from the full deck. When you're ready, drill the flashcards or test yourself under exam conditions.
C++ is built around four foundational principles of object-oriented programming: encapsulation, which bundles data and the functions that operate on it together; abstraction, which...
Read full chapter →Inheritance allows a derived class to inherit members from a base class, declared with a colon and access specifier in the derived class header. It promotes code reuse and expresse...
Read full chapter →Constructors are special member functions automatically invoked when an object is created. They share the name of the class and have no return type. A default constructor is one th...
Read full chapter →Templates let you write generic code that works with any type. A function template such as template<typename T> T max(T a, T b) { return (a > b) ? a : b; } defines a famil...
Read full chapter →The standard library containers fall into three families. Sequence containers preserve insertion order and include vector, deque, list, array, and forward_list. Associative contain...
Read full chapter →Modern C++ introduces a host of utilities that improve expressiveness and safety. Lambda expressions are anonymous function objects defined inline with the syntax [capture](params)...
Read full chapter →Pointers and references are the two ways to refer indirectly to objects. A reference is an alias for another object: an lvalue reference T& binds to a named object, cannot be n...
Read full chapter →C++ handles errors through exceptions and the try-catch construct. A try block contains code that may throw, and catch blocks match against thrown exception types; exceptions propa...
Read full chapter →Done reading?
Test yourself with the Cpp Programming practice exam — timed questions, instant score, full review of wrong answers. Free.
🎯 Take the Practice Exam →