C++Tutorial for Beginners 47 - Returning Objects from Functions

Returning objects from functions is a little tricky in C++, at least in C++ 98. We'll take a look at how to avoid common pitfalls in this tutorial. If you want an even better way to handle it, check out my C++ 11 tutorial -- but be prepared to dive into some slightly complicated stuff involving rvalue references.