C Board  

Go Back   C Board > General Programming Boards > C++ Programming

Reply
 
LinkBack Thread Tools Display Modes
Old 10-24-2006, 02:23 PM   #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?
__________________

╔╗╔╦══╦╗╔╦══╦╗
║╚╝║╔╗║╚╝║╔╗║║
║╔╗║╠╣║╔╗║╠╣╠╣
╚╝╚╩╝╚╩╝╚╩╝╚╩╝

codez http://code.google.com/p/zxcvbn/
Tonto is offline   Reply With Quote
Old 10-24-2006, 02:26 PM   #2
ZuK
Registered User
 
Join Date: Aug 2005
Posts: 1,332
Code:
void child::do_sth() {
   parent::do_sth();
   do_some_more();
}
Kurt
ZuK is offline   Reply With Quote
Old 10-24-2006, 07:00 PM   #3
Registered User
 
Tonto's Avatar
 
Join Date: Jun 2005
Location: New York
Posts: 1,465
Silly me. Thx.
__________________

╔╗╔╦══╦╗╔╦══╦╗
║╚╝║╔╗║╚╝║╔╗║║
║╔╗║╠╣║╔╗║╠╣╠╣
╚╝╚╩╝╚╩╝╚╩╝╚╩╝

codez http://code.google.com/p/zxcvbn/
Tonto is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Forum Jump

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


All times are GMT -6. The time now is 12:04 AM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.2

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