Array size at run time unknown
I'm looking to write a program which will read in a set of data points from a file and place these in a float-array, the problem is i don't know how many data points i will have. I have been making oversized arrays and then just filling them up to N values and keeping track of N but I would like a more dynamic way of doing this. I have looked at the vector class but I am using a third-party library in my program and i need to pass float arrays to some of it's functions otherwise the vector would be the perfect solution.
is there a way to initailise an array dynamically or initalise an array with a vector ?
How does the vector class get around the issue of dynamic allocation?