With an extra newline and space. I can't figure out how to get rid of it and print it on the same line. Any suggestions?
I have checked that text does not include new line character at the end. Also, it seems to print correctly using cout, but not print correctly to output file...
I have checked that text does not include new line character at the end.
It must... as that is the only way this could happen. How did you check? With a debugger?
Also, it seems to print correctly using cout, but not print correctly to output file...
You might have a stray \r at the end of your string... but not a stray \n. I don't think cout will treat \r as a newline... but many text editors might.