Is it possible to return an array, or more then one variable from a function?
Thanks,
Nathan
Printable View
Is it possible to return an array, or more then one variable from a function?
Thanks,
Nathan
No. However, you can return a pointer to an array (but note that the array cannot be local to the function) or you can return a struct that consists of multiple values.Quote:
Is it possible to return an array, or more then one variable from a function?
95% of the cases when "you want to return an array", what should REALLY happen is that you pass an array INTO the function, and use the passed in array to fill in the data.
--
Mats