Say I have a base class A that combines B and C:
class A
{
B _b;
C _c;
}
in what order will _b and _c be deleted?
I read somewhere that this is the reverse order of their distribution.
So, I think in this little example, _c is deleted before _b, right?
Now, if I have a constructor A that looks like this:
A::A():
_c(...),
_b(...)
{
}
In what order are the _b and _c constructors called?
If the _b constructor is really called before _c alone (relative to their order in A), then I find it really counteracting intuitive!
In this case, what will be the order of destruction?
Thank you for your help!:)
(On a side note, I can't seem to type "}" in the Stackoverflow editor. Had to copy and paste from an external editor !?)