Quote:B b; //will Message("A"); -------why? I think I can get Message("B")!-----
B constructor explicitely calls the
A constructor, hence you get such a message.
Sorry, that was wrong, as pasztorpisti
pointed out. You may find correct info here:
C++ FAQ: [23.5] When my base class's constructor calls a virtual function on its this object, why doesn't my derived class's override of that virtual function get invoked?
This is the usual polimorphic behaviour.