Hi. I cannot remember under what condition, or for what purpose a function would be placed to the left of the assignment statement. It may have something to do with passing by reference, but I'm not sure. Can someone please clarify. For example:
function() = something.
Last edited on
It can be done provided that the left side expression is lvalue.:)
please expand on that with an example!!
std::string s( 1, ' ' );

s[0] = 'A';

That it will be more clear the last statement can be rewritten as

s.operator[]( 0 ) = 'A';
Last edited on
благодарить = thanks.
Topic archived. No new replies allowed.