· 3 min read

Master C++ STL & OOP with 59 Flashcards: Containers, Virtual Functions, RAII and Smart Pointers

Learn C++ STL containers, iterators, algorithms, virtual functions, RAII, move semantics and smart pointers with 59 flashcards, plus 3 fixes to make first.

C++ flashcards with gears, angle brackets and curly braces on an indigo-violet gradient

Studying. But it's also a video game. 🎮

Flashcards, quizzes and games that make you actually remember.

Start playing — it's free

Posted by

C++ interviews and exam questions keep circling back to the same two pillars: the Standard Template Library and object-oriented design. The Flip It deck DV6912 "C++: STL & OOP" packs both into 59 cards, then adds a short run of modern C++11 features. Here is how to get the most out of it.

Study this deck: C++: STL & OOP

1 / 10
Question

STL

Knew itLearning

Tap the card for the answer · swipe right if you knew it, left if not

What the deck actually covers

The cards fall into three blocks, and studying them in that order works well:

  1. STL (cards 1-18, plus card 59): containers, iterators and algorithms.
  2. OOP and object lifetime (cards 19-51): classes, inheritance, virtual dispatch, constructors, smart pointers, the rules of three and five.
  3. Modern C++ utilities (cards 52-58): pair, tuple, lambdas, auto, decltype, nullptr, range-based for.

You'll drill: std::vector, std::list, std::deque, std::map, std::set, std::unordered_map, std::unordered_set, the container adapters std::queue, std::stack and std::priority_queue, begin()/end(), std::sort, std::find, std::transform, std::for_each, access specifiers, encapsulation, polymorphism, pure virtual functions, abstract classes, constructor/function/operator overloading, templates, the diamond problem, virtual inheritance, friend functions, static members, const correctness, copy constructors, move semantics, rvalue references, RAII, unique_ptr, shared_ptr and weak_ptr.

Sample cards

FrontBack
std::mapAssociative container of key-value pairs in sorted order (balanced tree)
std::unordered_mapHash table-based associative container (unsorted)
begin() vs end()begin() points to the first element; end() points one past the last
struct vs classstruct members are public by default; class members are private by default
Pure virtual functionvirtual void func() = 0; makes the class abstract
Diamond problemAmbiguity when a class inherits from two classes sharing a common base
RAIIResource Acquisition Is Initialization: resource lifetime tied to object lifetime
Rule of fiveRule of three + move constructor + move assignment operator (C++11)
std::weak_ptrNon-owning reference to an object managed by shared_ptr

Three fixes before your first review

  • Fix the capitalisation. The editor sentence-cased every STL front: Std::vector, Std::sort(), Std::unique_ptr. C++ is case-sensitive and the namespace is std, lowercase. Retype those 20 fronts once so your eyes never learn the wrong form.
  • Write the missing lifetime cards. The rule of five names the move constructor, the copy assignment operator and the move assignment operator, but none of them has its own card. Add three cards with the actual signatures (T(T&&) noexcept, T& operator=(const T&), T& operator=(T&&) noexcept), plus one for std::make_unique / std::make_shared, which is how you should create those smart pointers in practice.
  • Add override. Cards 23-26 teach virtual dispatch without the C++11 override keyword that catches signature mismatches at compile time. One extra card closes that gap.

Study tips specific to this deck

Build a container decision table. Cards 3-12 and 59 describe containers one by one, which makes them hard to tell apart under pressure. Make a single grid with columns ordered? / unique keys? / lookup cost / insertion cost: map/set give O(log n) sorted lookups, the unordered pair gives average O(1), vector gives O(1) random access. Then review card 59 (vector vs list) with a caveat the card omits: list only wins on insertion when you already hold an iterator, and vector's contiguous memory usually wins in real benchmarks thanks to the CPU cache.

Pair the ownership cards. Review unique_ptr, shared_ptr, weak_ptr and RAII as one group and answer out loud who deletes the object, and when? That single question is what interviewers are really asking.

If you want the layers underneath, pair this deck with our guide to C pointers, memory and syntax; for the managed-language counterpart, see C# fundamentals and .NET Core.

Find deck DV6912 in the library on Flip It and start with the STL block today.

Ready to learn faster? 🚀

Join FLIP IT for free and turn studying into a game.

Create my free account