+ 3
Assigning to functions?
https://code.sololearn.com/cVJ322bN3ncC/?ref=app What is happening when we assign to f()?
1 Odpowiedź
+ 2
never mind, i figured it out, f() returns a lvalue reference to i, and therefore we assign to i, since lvalue referenced are lvalues and since the variable is static everything works out.
https://stackoverflow.com/questions/6111905/c-is-return-value-a-l-value