I have come across override keyword used in the header file that i am working on. May i know, what is real use of override, perhaps with an example would be easy to understand. For overrides of that virtual function in a class derived from some base class providing a virtual function of the same (or covariant) signature final:
For marking an override as unoverrideable. Mar 23, 2009what is the difference between overloading and overriding. @override tells the compiler your intent:
If you tag a method @override, you intended to override something from the superclass (or interface, in java 6). A good ide will helpfully flag any method that. Something like c#'s override keyword is not part of c++.
Dec 3, 2010public class naivealien extends alien { @override public void harvest(){} } i was trying to understand my friend's code, and i do not get the syntax, @override in the code.