can i return more than one value from a function in c++? i've tried it myself and it does not work but maybe i am doing it wrong and there is a way to do it?
#include <iostream>
usingnamespace std;
struct foo_argument
{
//put the definitions u want here
//...
};
struct foo_return_value
{
//put the definitions u want here
//...
};
void foo(foo_argument & farg, foo_return_value & fret)
{
//do what you want here
//...
}
int main()
{
foo_argument foo_in;
foo_return_value foo_out;
//set the arguments
//...
//call foo
foo(foo_in,foo_out);
//do what you want with the returned values
//...
return 0;
}