I am re-posting this question which was also posted last night, but I dont think I described my desired end state well enough. The code/class attached works very well at reading in a file with a single column of float data. However, i need it to read in columns of data with the format listed below;
318.47 November 01 2014
21.78 November 02 2014
0.00 November 03 2014
As you can see, the data in the input file is a float, then a character string, an integer and then another integer. However, I really dont care about the last three columns, I only want the first column. Unfortunately C++ tries to read across until the row comes to an end and then advances to the next line, so it tries to read the month, day and year, even though I dont want it to. is there any way I can force the code to read the 318.47 and then advance to the next line and continue to do this until the end of file is reached.
Also, while in this specific instance, I only want to read in the first column, how do i set this problem up if I do want to read all four columns. If I try;
the code will not even compile, as I expected it would not. The point being is that if I do not use the vector format I know how to read in all four columns, but how do I do this with the vector format. the first question listed above is most near-term important to me, but if you can answer this second question with a code example, I would be very grateful.