Is it possible to “reuse” a parent method in a child method and add functionality, just like with the super operator in Java?
parent.method(int a){
a++;
}
child.method(int a /*would be nice w/out*/){
printf("%d",a);
}
I know that this is probably quite a basic question, sorry about that.
I know I can just copy/paste the method to the child class and add the functionality there, by overloading; I’m looking for a more convenient way though.
You can use __super to do this, but it is a Microsoft extension.
Alternatively you can explicitly call the base implementation from the derived class: