When OutFile to a text file, why does it display in a straight line even though I have set << endl; at the end?
When OutFile to a text file, why does it display in a straight line even though I have set << endl; at the end?
Last edited by wiz23; 05-02-2005 at 04:56 AM.
You can't guard me 1 on 1!
More code.
All the buzzt!
CornedBee
"There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
- Flon's Law
No idea.
Post a program which does this (a test program if your main program is large), and state your operating system and compiler.
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
If at first you don't succeed, try writing your phone number on the exam paper.
Why is your title "reading form text file" when the problem is about writing to it?
Anyway, what program do you use to view it? That might be the problem too. I've noticed this effect on other text files, most likely caused by the \n \r stupidity...
MagosX.com
Give a man a fish and you feed him for a day.
Teach a man to fish and you feed him for a lifetime.
I use Notepad to see the text file.
You can't guard me 1 on 1!
Try wordpad?
MagosX.com
Give a man a fish and you feed him for a day.
Teach a man to fish and you feed him for a lifetime.
Oh OK, thanx. I can see them in a better layout.
You can't guard me 1 on 1!