The basic idea would be to use a std::vector, which grows in size automatically.
Here is a small example. Note: instead of two vectors, it would be better to
create a class with two data members and have one vector of that class.
using namespace std;
in.ignore(1000,'\n'); // skip header line
while (in >> f1 >> f2)