We can't find the internet
Attempting to reconnect
Something went wrong!
Attempting to reconnect
← All tracks
0 / 4
Const Correctness and Class Design
C++The public surface is the API, and what it permits is what callers will do. `const` as a promise the compiler enforces, and the constructor that converts behind your back.
This track is written for C++, which isn't the mode you're browsing in.
0
/ 3 solved
- 1. Not solved yet. The accessor that will not let you look
- 2. Not solved yet. The conversion nobody asked for
- 3. Not solved yet. The handle you left in the door
Check yourself
4 questions · one attempt eachThese do not count toward finishing the track. They are here to catch the things that are easy to read past.
who() is virtual and Derived overrides it. Why do these two print differently?
Derived d;
Base sliced = d;
Base& ref = d;
sliced.who();
ref.who();
Question 1 of 4