help me please....A function to read vector???

May 4, 2013 at 6:00am
A function, called ReadVector(), which reads a vector of any size from a given file name, and returns the vector and its size to the caller. The function prototype is defined as follows:
void ReadVector(double V[], int &size, ifstream infile);
thanks very much...

how to write this function???
i want an example of a code
the input file sample like this one
5
2.7
8.3
9.2
4.2
6.5
where (5) is the size...

thanks very much...

Last edited on May 4, 2013 at 6:40am
Topic archived. No new replies allowed.