overloading and overriding

This is a discussion on overloading and overriding within the C++ Programming forums, part of the General Programming Boards category; What is the difference between function overloading and function overriding?...

  1. #1
    Unregistered
    Guest

    Question overloading and overriding

    What is the difference between function overloading and function overriding?

  2. #2
    Registered User
    Join Date
    Apr 2002
    Posts
    3
    when you overload a function you create the same function with a different sig..

    ex..

    void doThis(int a);
    void doThis();
    void doThis(char z);


    overriding is when you have functA() in class X...
    then you create a class Y that is a subclass of X... and in Y you redefine functA() (the sig stays the same)... and unless you explicitly call the functA() from class X, the functA() from Y will be used... so the funct was overridden..

    got it..

  3. #3
    Unregistered
    Guest

    Talking

    Thanks for the help!

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Overriding OnEraseBkgnd
    By durban in forum C++ Programming
    Replies: 0
    Last Post: 11-01-2005, 12:44 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21