A valid question to ask when writing functions:
by Eli Bendersky
From the article:
Since C++ has no built-in syntax for returning multiple values from functions and methods, programmers have been using a number of techniques to simulate this when needed, and the number has grown since the introduction of C++11. In this post I want to provide an overview of some of the options we have today for returning multiple values from functions, and possible future directions in the language...