Quote:
what is virtual inheritence?
Virtual inheritance solves the "diamond inheritance" problem, where there is some class A, which is the base class of two classes B and C, and a fourth class, D, inherits from both B and C. Using non-virtual inheritance, an object of type D has two copies of A in it, and must be qualified as D::B::A and D::C::A. If B and C virtually inherit from A, then class D will only have one, unambiguous copy of A and referenceing A does not require such explicit qualification.
Quote:
What's the difference between a pointer and a reference?
A reference is simply another name for an object, and does not occupy a place in memory. Thus, you cannot take the address of a reference, because it doesn't actually exist at runtime.
Quote:
what's the difference between prefix and postfix operators?
Postfix operators (like increment) require storing a temporary copy of the object being incremented, incrementing the actual object, and returning the temporary copy as a result of the expression. Prefix operators (like increment) increment the actual object and evaluate to the actual object.
Quote:
what is a virtual constructor?
There is no such thing. People wanting behavior that would seem like a 'virtual constructor' are usually talking about something like the factory pattern.
Quote:
why shouldn't you inherit from the standard library containers?
Becuase they don't define their destructors as virtual, and therefore their destructors will not be called when your derived version of them is destructed.