virtual functions changing from protected to private - question

MatthiasM dm at matthiasm.com
Tue Sep 5 13:35:32 PDT 2006


Jarrett Billingsley wrote:
> Since you've made it private, the compiler makes it nonvirtual.  Since it's 
> nonvirtual, it doesn't live in the virtual table at all.  So it doesn't 
> override the Window.draw().  Virtual methods and nonvirtual methods live in 
> two different places, so it's not really possible to override a virtual 
> method with a nonvirtual method. 

Thanks for verifying my assumption. I am still very much in C++ world 
where this is perfectly fine... .



More information about the Digitalmars-d-learn mailing list