Thread: Calling parent methods

  1. #1
    Registered User Tonto's Avatar
    Join Date
    Jun 2005
    Location
    New York
    Posts
    1,465

    Calling parent methods

    Is there a simple to sort of chain the calling of some child's method with the parent's. The child method only specializes some aspect of a method but still wants the parent's functionality?

  2. #2
    Registered User
    Join Date
    Aug 2005
    Location
    Austria
    Posts
    1,990
    Code:
    void child::do_sth() {
       parent::do_sth();
       do_some_more();
    }
    Kurt

  3. #3
    Registered User Tonto's Avatar
    Join Date
    Jun 2005
    Location
    New York
    Posts
    1,465
    Silly me. Thx.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. calling parent from child
    By Aemon07 in forum Windows Programming
    Replies: 5
    Last Post: 07-25-2007, 09:27 PM
  2. calling OpenGL methods from outside the main class
    By Hector in forum Game Programming
    Replies: 2
    Last Post: 06-22-2006, 07:23 AM
  3. child classes calling parent constructors (with arguments)
    By reanimated in forum C++ Programming
    Replies: 3
    Last Post: 05-01-2006, 10:52 AM
  4. Request for comments
    By Prelude in forum A Brief History of Cprogramming.com
    Replies: 15
    Last Post: 01-02-2004, 10:33 AM
  5. calling methods
    By alcoholic in forum C++ Programming
    Replies: 1
    Last Post: 01-25-2002, 11:23 AM