Members of the class are initialized in the order in which they are declared before entering the constructor body. It means that when we create a class B, B::a will be initialized first using the A::A() constructor and B::b will be initialized then using the A::A(int) constructor, and then the operator= will be called in the body of B::() constructor.
Ввійдіть щоб вподобати
Ввійдіть щоб прокоментувати