Hi everyone,

For the past few days I've been attempting to answer this personal mystery through what C++ literature I have available with me, but none of it seems to really go into the level of detail I need for my current project. My question is pretty much theory, so I'll paraphrase without pasting a nagging piece of code.

I have:

Class X,
Class A,
Class B, derived of Class A and Class X
Cass C, derived of Class B.

These classes have some pretty normal members, explicit initialization constructors and destructors. All copy constructors are, for now, implicit. They all have some reporting capabilities when it comes to creation/destruction, so when I do:

C SomeObject = C();

Or similar, I see nothing out of the norm. My problem starts when copying to a function parameter. Let's call it void Foo(C copiedObject). Doing:

Foo(SomeObject);

..certainly engages a copy constructor. The problem is, I cannot determine how exactly this copy is constructed. I was expecting bitwise copies of members and calls to every base class' copy constructor in some orderly fashion, yet I'm seeing (through debug outputs) initializations mixed in the process. So what I'm asking is basically:

1) in what order what kind of constructors are called upon to resolve this sentence?
2) When are members, such as variables and internal data "duplicated" amidst these constructions, for each of the classes pertaining to this object?

As a sidenote, I have a couple of really important classes I must not, under any circumstance, accidentally copy or let go out of scope without my knowledge. In order to avoid mindless bug hunting later on, I deviced some pretty strong errors whenever either of these cases occur, but in streamlining the code to simply bestow any new class I create with this capabilities by making it derived of stuff such as "CopyBan" or "DeathBan", I stumbled upon this little enigma.

Any help would be greatly appreciated.