> I'm quite sure, that this is legal code. It isn't. The function foo in the derived class hides the one in the base class. Please consult a book about C++ for details. Regards, Martin