Hey guys, Im trying to copy lines of a txt file into a vector. Everything is working fine except the last line is being copied twice. I cant figure out why
If your file has some blank lines after the last valid entry you'll see this type of problem. To insure you properly parsed the string you should check the stringstream state before adding the data to your vector.