+ 3
Returning values of functions
Is it possible to return two values in a function at the same time in c++. If yes,please explain how. EXAMPLE: Int func(){ Int a=2; Int b=6; Return a; Return b; }
2 Antworten
+ 4
These are some many ways to modify/return multiple values in a single function.
https://dzone.com/articles/returning-multiple-values-from-functions-in-c
The easiest and the one I've personally used is calling functions by reference.
+ 2
a simple solution is return values in array