Results 1 to 4 of 4

Thread: can anybody expalain me about

  1. #1
    Junior Member
    Join Date
    Feb 2008
    Answers
    1

    can anybody expalain me about

    can anybody expalain me about what is and why we use virtual functions? how it is help full in our regual programming?


  2. #2

    Re: can anybody expalain me about

    Inheritance on its own provides you with a means to make one class inherit the functionality of another. Usually, after doing that, you’ll add more functionality to specialize the subclass. However, you can also override the functionality in the base class, effectively replacing the way that even that inherited functionality works.

    Making a method virtual involves nothing more than
    putting the word Overridable in front of its name. After that’s done, subclasses can override the virtual method with the Overrides keyword

    Use of Virtual Method:
    1. Preserve The Base Class
    2.Use Virtual methods when you don't have access to the base class .i.e, You can't inherit from base class


  3. #3
    Junior Member
    Join Date
    Jan 2008
    Answers
    1

    Re: can anybody expalain me about

    hi to all.


  4. #4
    Junior Member
    Join Date
    Mar 2008
    Answers
    15

    Re: can anybody expalain me about

    virtual function is special function which can override the previous function...

    when you declare two function having same name and one as virtual...and when you call a function the compiler detrmines which function to use at runtime.and it preserves the base class....this is its use


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
About us
Applying for a job can be a stressful and frustrating experience, especially for someone who has never done it before. Considering that you are competing for the position with a at least a dozen other applicants, it is imperative that you thoroughly prepare for the job interview, in order to stand a good chance of getting hired. That's where GeekInterview can help.
Interact