Yes. To return a vector of strings, for example, you would do this:
vector<string> function();
To return a pointer to a vector of strings, you would do this:
vector<string> *function();
To return a vector of any valid type, you would do something like this:
template <typename T>
vector<T> function();
You can also return a pointer to a vector of any type. Templates are pretty versatile.
Narue
Bad Cop
15,460 posts since Sep 2004
Reputation Points: 6,464
Solved Threads: 1,401