Answer to Question #542 in C++ for Molly

Question #542
How to return two values from the function?
1
Expert's answer
2010-08-05T09:50:23-0400
Operator return can return only one value. If you want to return two, they should be packed into a single object, for example std::pair type. Or you can use variables with the result saved by reference.

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
APPROVED BY CLIENTS