Make class-method act diferently depending on which subclass it got called from?(C++)
well, the subject pretty much says it all..
i have a base-class, with 5 other classes derived from it.
the base-class has a method which all of the sub-classes inherit.
now when i call that method from one of the sub-classes, i want it to act differently depending on which sub-class it got called from. is there some fancy way of knowing which sub-class it got called from or will i have to specify that in a parameter when calling the method?
thanks in advance
Quote:Original post by Zahlman
You should probably read the whole page actually.
People should probably read the whole site, actually.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement