Im stuck on how to break out of this loop when it hits eof(it out puts the last line twice). all the research ive done says to use a break statement however we are not allowed to do that in this class. any help would be greatly appreciated.
I'd use something like: while(getline(ins,string my_string))
thats the only way I know to stop the while before the last loop you are getting. I suppose you can use C++ features.