output prints twice for some reason

Solved thanks!
Last edited on
Check whether the file stream is good after your getline(s):

1
2
3
4
5
6
7
while(true)
{
    getline(filename, Item1);
    if (!filename.good()) break;

    //...     
}
Thanks!!
Topic archived. No new replies allowed.