I am currently reading the learn C++ in 21 days tutorial. In a chapter on references, when the author summarizes some of the main points inside a respective section, he explicitly states, "DON'T return a reference to a local object. "
I am simply curious what this means. I have an idea, but I don't understand why I can't do it, unless, of course, the memory would be reassigned when the variable goes out of scope.