R
Rafael Anschau
In this case, how does the compiler knows which to run, given
that both operators receive the same parameter ?
class String
{
// overloaded operators
char & operator[](int offset);
char operator[](int offset) const;
//Which one gets runed ? If not based on parameters then based on
what ?
};
Thanks
that both operators receive the same parameter ?
class String
{
// overloaded operators
char & operator[](int offset);
char operator[](int offset) const;
//Which one gets runed ? If not based on parameters then based on
what ?
};
Thanks