I may be understanding inheritance wrong but say if:
I have base class called Base and a derived class of Base called Derived,
In a function of the Derived class, can I access the Base object of the Derived class? I guess a bit like *this but of object type Base ?
EDIT: I am overriding a function Base::foo() in the Derived class, but in this overridden function Derived::foo() i want to call the original function with the Base object.
Derived::foo() const {
double Derived::foo() const {
// s is a variable only associated with Derived
double x;
x = s + Base.foo(); // this is the line i dont know what im doing?!
return x;
}