Afficher un message
Vieux 07/12/2007, 15h27   #10
Victor Bazarov
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Am I the only one mad here?

Kira Yamato wrote:
> [..] I was looking for a convincing reason why overriding
> was introduced in C++.


Overriding was introduced as part of implementation of run-time
polymorphism in the language. Without overriding it would be
useless to declare functions virtual. If they don't override,
how would the derived class provide its own behaviour for the
declared virtual function in the class it inherits?

Or did you mean you were looking for a convincing reason why
_name hiding_ was introduced in C++?

V
--
Please remove capital 'A's when replying by e-mail
I do not respond to top-posted replies, please don't ask


  Réponse avec citation
 
Page generated in 0,04423 seconds with 9 queries