Skip to content
AtomicReps

Navigation

15/29Computer Science

C++ Programming.

The C++ language: references, classes, virtual dispatch, lambdas and casts.

  • C++ Programming · 1 of 3

    Range-based for & Initialization

    What does int z{}; give z?

  • C++ Programming · 2 of 3

    Lambdas & Captures

    A closure that captured a local by reference is returned and then called. What does this program do?

    typescript
    #include <iostream>#include <functional>std::function<int()> make() { int local = 7; return [&local]() { return local; }; }int main() {  auto f = make();  std::cout << f();}
  • C++ Programming · 3 of 3

    Inheritance & Virtual Functions

    A developer stores a parent-typed copy in a cache and later downcasts it, and the cast always fails. Why?

Three of the 1,760 C++ Programming questions.

Keep going with C++ Programming, free
Next topic · 16/29C++ Standard Library.