If you have a small number of variables to return, sometimes its just as easy to pass the variables by reference, like this:
1 2 3 4 5 6 7 8 9 10 11
void function1(int &a, int &b) {
a = 1+2;
b = 3+4;
}
void function2(void) {
int a, b;
function1(a, b);
std::cout << "A: " << a << "\tB: " << b << std::endl;
}