METHOD OVERRIDING

Pooja Malohtra

Total Post:47

Points:331
Posted by  Pooja Malohtra
OOPS 
 2093  View(s)
Ratings:
Rate this:
What is the concept of method overriding in C++?
Please advice or any helpful link.
  1. Uttam Misra

    Post:126

    Points:906
    Re: Method Overriding

    Overriding - Same method name with same arguments and same return type associated in a class and its subclass.
     
    Example for Overriding

    Class X
    {
    Virtual void Add(int a, int b)
    {
    }
    }

    Class Y:X
    {
    public override void Add(int a, int b)
    {
    }
    }

      Modified On Oct-21-2010 03:19:08 AM

Answer

NEWSLETTER

Enter your email address here always to be updated. We promise not to spam!