August 12, 2006
Hello,

What is the best way to let a function return multiple variables(of
different types)?
Currently I use structures for this, but making special stuctures for this
can't be the best way.

Thanks.


August 13, 2006
nobody_ schrieb:
> Hello,
> 
> What is the best way to let a function return multiple variables(of
> different types)?
> Currently I use structures for this, but making special stuctures for this
> can't be the best way.
> 
> Thanks.
> 
> 

I think there not a 'best' way. I can think of three ways.
return a struct
'out' parameters values
pointer parameter (c-style)
object parameter (by reference, needs a class)

If you want to return 2 int, perhaps the out is the best.