If you want a function that return two (or more) values, you have two possibilities:
1- Make the function void
and return the values as parameters by reference &
2- Declare a struct (or class) that groups the values and make the function return a value of this struct.