Now, I know this is a common question, but I haven\'t been able to really find a straight answer on this. This is really a question about standards. I am working on a project in
Is the only solution to pass a "resultant" vector by reference?
No. You can also pass an iterator, like algorithms do:
void func( InputIt first, InputIt last, OutputIt res);
you can then make this a template:
template< class InputIt, class OutputIt >
void func( InputIt first, InputIt last, OutputIt res);