Exforsys
+ Reply to Thread
Results 1 to 3 of 3

Function Overriding

This is a discussion on Function Overriding within the C and C++ forums, part of the Programming Talk category; How is function overriding done? Please provide some examples on how to do it....

  1. #1
    Adrian is offline Senior Member Array
    Join Date
    Apr 2006
    Answers
    124

    Function Overriding

    How is function overriding done? Please provide some examples on how to do it.


  2. #2
    cyrus is offline Senior Member Array
    Join Date
    Apr 2006
    Answers
    128
    In C++ , a function of a class that inherits from multiple base classes or interfaces, can override more than one base class function only if all the base classes or interfaces have a function of the same name and signature. This is the concept of multiple overriding.


  3. #3
    ashlee is offline Senior Member Array
    Join Date
    Apr 2006
    Answers
    108
    In addition to multiple overriding in C++ it is also possible for users to carry out explicit overriding of functions. That is a derived class function having the same name and parameters as a base class virtual function will always override it. In C++/CLI you have the option of using the new contextual keyword to specify whether you want to override a base class function or hide it.


    •    Sponsored Ads



Latest Article

Network Security Risk Assessment and Measurement

Read More...