How to “return an object” in C++?
I know the title sounds familiar as there are many similar questions, but I’m asking for a different aspect of the problem (I know the difference between having things on the stack and putting them on the heap). In Java I can always return references to “local” objects public Thing calculateThing() { Thing thing = … Read more