changing return type of derived function
I am writing a code and got a problem with deriving the class.
I have got a class A (with pure virtual functions) which got a (pure virtual) function operator.
also I got classes B and C which inherits A.
if B is a class which is a vector of complex numbers and C is a bitArray than what should operator return.
in the situation of B it should return a reference to complex number.
In the case of C it should return a proxy class which holds the bit.
thus, how can i define operator in A so both B and C can overwrite the operator.
It is important that everyone who uses A knows that it supports operator.
thanks in advance.