I think you are just going to have to count the lines until you get to the one that you are interested in. You could avoid that if you made sure that your data file contained fixed length lines.
You should never loop using eof() as the condition of your while() clause. The reason being that EOF will not be flagged until after you try to read past the end of the file. This means that your getline() will fail (when it reaches the end of the file) but that you will still be using its values, that did not come from the file.
You still have the same problem. When your getline(cashflow, columns[x], ':'); fails because it reached the end of the file you will still use its values even though they were never read. You need to check your stream *after* doing getline(), not before.