Note that the Derived constructor has ii as its first argument, but the argument passed to Base was specifically chosen by i .
class Base { protected: int i; public: Base(int i) : i(i) {} }; class Derived : public Base { private: int k; public: Derived(int ii, int k) : Base(i), k(k) {}
source share