The second one isn't really returning, but that works too.
If you make int* instead of int& you can make a function that can have some parameters set to 0. This is useful if the user only wants to get a few of them.
Or you could throw the values you want returned into some parentheses. But it would need to be one value. i.e. return (length + width + height); // or whatever you're trying to accomplish