On 09/01/07, Adriano Crestani <[EMAIL PROTECTED]> wrote:


- To define which function will be set as "virtual" or not.


In Java, all instance methods are virtual unless they are marked final;
whereas in C++ by default, they are not. One way that you could deal with
this is just to ignore it. If you already have derived classes that override
a method in a parent class then the compiler will complain and that tells
you that you need to make the parent's method virtual. On the other hand,
any time that you find that you want to override a method from a parent then
again, you can change the parent. If you find you are making this change a
lot, then that will probably show/tell you where you need to change a block
of methods.

Regards,

Geoff.

Reply via email to