Returning multiple values from a function

suggest change

There are many situations where it is useful to return several values from a function: for example, if you want to input an item and return the price and number in stock, this functionality could be useful. There are many ways to do this in C++, and most involve the STL. However, if you wish to avoid the STL for some reason, there are still several ways to do this, including structs/classes and arrays.

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents