I have done a search though here and found similar problems but in my situation I need to have a while loop or some kind of loop.
Anyways so like the others my code is also picking up an extra character at the end of the file. in command prompt when I used cout to troubleshoot it shows up with a blank character, a screendump of the output is below.
I guess my question is what other alternative do I have or is there a way around this? Thanks