|
-
November 21st, 2010, 06:24 AM
#2
Re: weird cout error, overwrites current line
 Originally Posted by E-man96
Here's my dilemma, whenever I cout a series of messages, the program will not append the message to the one before it. Instead, it simply writes over the last one. Kinda like if it's just gluing the messages on top of each other.
Maybe the file you are reading contains a carriage return before each line ending. When you use getline, the line ending is not copied, but the carriage return is.
Easiest way to fix that is probably to remove a carriage return from the end of a line after you read it.
Cheers, D Drmmr
Please put [code][/code] tags around your code to preserve indentation and make it more readable.
As long as man ascribes to himself what is merely a posibility, he will not work for the attainment of it. - P. D. Ouspensky
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|