vector<double>& V is this a valid function declaration?

Hello guys,
I want to declare a void function such that, it will take a ifstream as input and two vectors as output, so I try to declare something as follow:

void output_series(ifstream& fin, vector<double>& v1, vector<double>& v2);

Is this valid? A "&" sign after vector<double> in a function declaration?

Actually is it valid to use vector<double> in a function declaration on the first hand? Certainly in elementary course I am taught to declare functions with variable types such as double, int, char etc. but is vector<double> a variable type such that I can use to declare functions in the same way?

Many thanks.

Bosco
Is this valid? A "&" sign after vector<double> in a function declaration?

Of course. The & makes it a reference.

but is vector<double> a variable type such that I can use to declare functions in the same way?

Yes.
oh thanks... i guess i must have made some other bugs somewhere else then, i cannot compile the file and i thought this might be the reason, so this turns out not the case... thanks i will have a check again
When something doesn't compile, there is an error message which tells you what's wrong.
Topic archived. No new replies allowed.