Weird Characters appear when reading from .txt file

I am trying to read from a file that has two lines of text. The text in the text file looks like this:

Name
HP ProBook 6470b

but the output from my command window looks like this:



However, when I copy the data from the .txt file into another .txt file, and then try to read it from that new .txt file, it works fine.

What is going on!?
Could you please print out the code? It would be a lot easier to help if I could see it. You could check this page out and see if it helps: http://www.cplusplus.com/doc/tutorial/files/
Topic archived. No new replies allowed.