Loading…
Memory, RAII, templates, the STL and modern C++ features.
Write a class Fraction whose constructor Fraction(long long num, long long den)
establishes its invariant:
What are a constructor and a destructor in C++? When does the compiler give you a default constructor, and when does it stop doing so?
What is the difference between these two constructors, and why does
the second one fail to compile once Account gains a
const std::string id_; member?
What is the difference between struct and class in C++? When
would you choose each?
What are the "rule of three", "rule of five" and "rule of zero"? Which one should most of your classes follow?
What does the explicit keyword on a constructor do? Show a bug it
prevents.