Much appreciated, but this particular program is for a class though, I need to make sure I know what I am doing and well we haven't covered anything related to the <sstream> header yet
Is there another way to work around this problem with simple functions?
If you have an input file which consists of multiple lines like this: 1. Oliver, 42, 405023, 12
then the most obvious approach is to read an entire line in one go into a string. Then use a stringstream to parse the line into individual words. And having already used stringstream once, it seems a small step to use it again to convert the string to int.