Overloaded operator question
I have a simple question but could find the answer in a thread...
I have a myString class and overloaded the operator with
(Actually it's the same as in the vector class: http://www.cppreference.com/cppvecto...operators.html)
char& operator(unsigned int index);
const char& operator(unsigned int index) const;
In my main Routine I have the following:
My question is, why in both cases only the first overloaded function is called... Is there a way to separate assignment and return-value?