hello,I am trying to use the derived method from a pointer to the base class without making the Base class knowing any of Derived classes. (Tried to simplify the code in the best way). I don t know why it does not access automatically the derived class operator. Actually it does not compile cause it requires the operator Base to be public and anyhow it wouldn t access the Derived operator.
Does anybody know how to fix it?
The function at L15 doesn't override the definiton L7 as the param is of a different type. L28 is trying to access Base operator!= which is protected and so cannot.
Lets have two shapes. Are they identical?
If they are both triangles and identical size and angles, then yes.
If they are both circles with identical radii, then yes.
However, how do you test that the shapes are actually same subshape? All you have is refs to base.