What does it mean to return a reference?
It means you return by reference, which is, at least in this case, probably not desired. It basically means the returned value is an alias to whatever you returned from the function. Unless it’s a persistent object it’s illegal. For example: int& foo () { static int x = 0; return x; } //… int … Read more