+ 2
If you are talking about C++, you could return an initializer list, an array, a tuple, a pair, a vector and much more. Example: std::pair<int, int> f(int x) { return std::make_pair(x, x * x); } In python you could return the values on a tuple, array, dict and more. Example: def f(x): return (x, x * x) Generally, you need to return the values inside a container.
26th May 2017, 1:21 PM
Madera Oxidada
Madera Oxidada - avatar