Thread: Inheritance...

  1. #1
    Join Date
    Feb 2003


    I was wondering, what are the exact advantages of inheritance over just redoing a class? Besides saving code space retyping it all, does it decrease compile time, make program run faster, be smaller, or what?

  2. #2
    Registered User
    Join Date
    May 2002
    There are plenty of books written on object oriented programming, trying to summarize it here would be too time consuming.

    Polymorphism is one benefit that comes to mind...

  3. #3
    Join Date
    Feb 2003
    I know polymorphism, I am talking about program speed, compile speed, program size,etc., not the in program benefits.

  4. #4
    Registered User xds4lx's Avatar
    Join Date
    Nov 2001
    lets see inheritence does not generate smaller code, nor faster code, nor does it decrease compile time or anything. it is used to extend the functionality of something that allready exists.
    "only two things are infinite, the universe and human stupidity, and im not sure about the former." - albert einstein

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 16
    Last Post: 06-08-2009, 03:03 PM
  2. Multiple Inheritance - Size of Classes?
    By Zeusbwr in forum C++ Programming
    Replies: 10
    Last Post: 11-26-2004, 09:04 AM
  3. inheritance and performance
    By kuhnmi in forum C++ Programming
    Replies: 5
    Last Post: 08-04-2004, 12:46 PM
  4. Inheritance and Polymorphism
    By bench386 in forum C++ Programming
    Replies: 2
    Last Post: 03-18-2004, 10:19 PM
  5. Inheritance vs Composition
    By Panopticon in forum C++ Programming
    Replies: 11
    Last Post: 01-20-2003, 04:41 AM