what is the syntax for returning 2 variable of different type in one function?
This is a discussion on really quick one within the C++ Programming forums, part of the General Programming Boards category; what is the syntax for returning 2 variable of different type in one function?...
what is the syntax for returning 2 variable of different type in one function?
efficient.....
pass by reference into the function so that changes take place to the variables.
inefficient.
wrap the two variables into a structure and return that struct by value.
Free the weed!! Class B to class C is not good enough!!
And the FAQ is here :- http://faq.cprogramming.com/cgi-bin/smartfaq.cgi