Thread: Inheritance?

  1. #1
    People Love Me
    Join Date
    Jan 2003
    Posts
    412

    Question Inheritance?

    What's inheritance and why's it useful?

  2. #2
    ___
    Join Date
    Jun 2003
    Posts
    806
    Wrong thread for this but.. inheritance is when someone dies or something and it passes onto you. You get it because it belongs to you and otherwise who knows where it would go.
    "When I die I want to pass peacefully in my sleep like my grandfather did, not screaming and yelling like the passengers in his car."

  3. #3
    Toaster Zach L.'s Avatar
    Join Date
    Aug 2001
    Posts
    2,686
    The beauty of inheritance in C++ is that the class doesn't have to die for you to get what it has.

    Well, thats a rather open ended question. Basically, it allows you to derive classes from a base class(es). There are many uses. For example, if you have a pointer (or reference) to the base class, it could actually be one of the derived classes, but you can treat it just as the base class. Really, there is too much to explain in this thread. For a brief example, see the thread by ygfperson entitled something to the effect of "What is the best way to..." (too lazy to post a link... perhaps later).
    The word rap as it applies to music is the result of a peculiar phonological rule which has stripped the word of its initial voiceless velar stop.

  4. #4
    carry on JaWiB's Avatar
    Join Date
    Feb 2003
    Location
    Seattle, WA
    Posts
    1,972
    I could only give you a little information, but have you looked here:

    http://www.google.com/search?hl=en&i...B+%2B+tutorial
    "Think not but that I know these things; or think
    I know them not: not therefore am I short
    Of knowing what I ought."
    -John Milton, Paradise Regained (1671)

    "Work hard and it might happen."
    -XSquared

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