class A{
public:
virtual char &operator[](int);
protected:
..
};
class B:A{
public:
A* &operator[](int);
protected:
}
Can I change the return type when I overload an overload of an operator?
thanks!
//EDIT Okay, so now that we established that this wont work how can I build a work around?
Lets say I have classes A,B,C, and D.
class A{
public:
private:
char &operator[](int);
protected:
..
};
class B:A{
public:
virtual char &operator[](int);
};
class C: A{
public:
private:
A::&operator[](int);
}
class D: A{
public:
private:
A::&operator[](int);
}
Can I do something like this? If so is this the correct syntax?