et cetera. Note as well that getline finds the comma and throws it away for you.Code:getline(Main, Action, ','); getline(Main, BDate, ',');
Todd's idea is simpler, but will only find the last part of the line. If you will never need Action and Date and all the rest, then there's no reason to try to read them. If you do need them, or will in the future, then you'll have to parse through the line as above.