Sponsored Links


Results 1 to 2 of 2

Thread: virtual function and virtual inheritence

  1. #1
    Senior Member saneha's Avatar
    Join Date
    Apr 2011
    Posts
    266

    Moodle virtual function and virtual inheritence

    Sponsored Links1


    what is the difference between virual function and virtual inheritence

    The purpose of virtual inheritence is to make behaviour of class like it direct base class.as in private inheritence only direct derived class can access the data members and functions.and in public,protected inheritence we can go deep in herarichy.


    Sponsored Links

  2. #2
    Administrator Vuhelper's Avatar
    Join Date
    Apr 2011
    Posts
    9,578
    With virtual functions, derived classes can provide new implementations of functions from their base classes. When someone calls a virtual function of an object of the derived class, this new implementation is called, even if the caller uses a pointer to the base class, and doesn't even know about the particular derived class.

    Virtual inheritance is a type of inheritance in which the part of the object that belongs to virtual base class becomes common direct base class for derived class and any other class that derives from it. Virtual inheritance is used in multiple inheritance.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 0
    Last Post: 05-31-2012, 01:51 AM
  2. Replies: 0
    Last Post: 05-31-2012, 01:46 AM
  3. Replies: 1
    Last Post: 05-31-2012, 01:35 AM
  4. Replies: 0
    Last Post: 05-12-2011, 09:03 PM
  5. Replies: 1
    Last Post: 04-24-2011, 06:28 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
-: Vuhelp Disclaimer :-
None of the files shown here are hosted or transmitted by this server. The links are provided solely by this site's users. The administrator's or staff of Vuhelp.net cannot be held responsible for what its users post, or any other actions of its users. You may not use this site to distribute or download any material when you do not have the legal rights to do so. It is your own responsibility to adhere to these terms. If you have any doubts about legality of content or you have any suspicions, feel free to contact us.
Online Education | JhelumSoft | Jobs