16.2 — Introduction to std::vector and list constructors

In the previous lesson , we introduced both containers and arrays. In this lesson, we’ll introduce the array type that we’ll be focused on for the rest of the chapter: std::vector. We’ll also solve one part of the scalability challenge we introduced last lesson. Introduction to std::vector std::vector is one …

17.1 — Introduction to std::array

In lesson , we introduced containers and arrays. To summarize: Containers provide storage for a collection of unnamed objects (called elements). Arrays allocate their elements contiguously in memory, and allow fast, direct access to any element via subscripting. C++ has three different array types that are commonly used: std::vector, std::array, …

O.3 — Bit manipulation with bitwise operators and bit masks

In the previous lesson on bitwise operators (), we discussed how the various bitwise operators apply logical operators to each bit within the operands. Now that we understand how they function, let’s take a look at how they’re more commonly used. In order to manipulate individual bits (e.g. turn them …