R
Richard
If class C inherits from class B, which inherits from class A, is the
order of the initializer list in the following constructor
insignificant (C only inherits from A because it inherits from B)?:
C::C() :
A(),
B()
{
}
That is, would:
C::C() :
B(),
A()
{
}
work just the same? What if none of these were default constructors
and some arguments to C's constructor where passed to the parent class
constructors?
Now, what if B's constructor was:
B::B() :
A()
{
}
Upon invoking the constructor for C, would A's constructor be called
twice?
order of the initializer list in the following constructor
insignificant (C only inherits from A because it inherits from B)?:
C::C() :
A(),
B()
{
}
That is, would:
C::C() :
B(),
A()
{
}
work just the same? What if none of these were default constructors
and some arguments to C's constructor where passed to the parent class
constructors?
Now, what if B's constructor was:
B::B() :
A()
{
}
Upon invoking the constructor for C, would A's constructor be called
twice?