Hi,
I'm new to C++ and actually used the tutorial here to learn it.
I'm wondering if there is a way to call a function in it's pre-overridden form after it is overridden. For example, say I want to have class draw a rectangle in a draw function. Then say I want to inherit this class and have the new class override the draw function and draw a circle. Is there a way to call the rectangle draw function too? Right now, it's forgetting about the old function, thus losing some of the functionality I wanted to keep.
Thanks,
Sean =)
Now I have another question.
It was stated that there were some automatically generated functions such as for copying the class.
How would I reference them? If they are automatically generated, how do I find out what they are?
Sean
The functions you're referring to are probably the copy ctor and assignment operator. These come with built-in default behavior, but can be overridden.
To access them:
1 2 3 4 5
MyClass a;
MyClass b(a); // copies a to b
MyClass c;
c = a; // copies a to c