Programmers have been using a number of techniques to simulate multiple return types from functions and methods in C++ since the introduction of C++11.
These techniques include using pointers, references, and tuples to return multiple values from a single function.
Additionally, C++17 introduced structured bindings, which allow for the decomposition of a tuple into individual variables.
See more results on Neeva
Summaries from the best pages on the web
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.
Returning Multiple Values from Functions in C++ - DZone
In C or C++, we cannot return multiple values from a function directly. In this section we will see how to use some trick to return more than one value from a ...
Returning multiple values from a C++ function