 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
LarryJ Guest
|
Posted: Thu Aug 18, 2005 6:54 am Post subject: O_APPEND Help |
|
|
I am opening a file as seen below. Borland C++6.0 is not adding each new
line of text to the next bottom line which I expect from O_APPEND. How do I
make this always write to the next line.
fd =open( Path.c_str(), O_APPEND|O_TEXT|O_RDWR);
write(fd, WriteText.c_str(), WriteText.Length() ) ){
close(fd);
Thanks
Larry.
|
|
| Back to top |
|
 |
LarryJ Guest
|
Posted: Thu Aug 18, 2005 9:34 pm Post subject: Re: O_APPEND Help |
|
|
I had to manually add the n to the end of each line to make this work.
"LarryJ" <LarryJ33 (AT) ev1 (DOT) net> wrote
| Quote: | I am opening a file as seen below. Borland C++6.0 is not adding each new
line of text to the next bottom line which I expect from O_APPEND. How do I
make this always write to the next line.
fd =open( Path.c_str(), O_APPEND|O_TEXT|O_RDWR);
write(fd, WriteText.c_str(), WriteText.Length() ) ){
close(fd);
Thanks
Larry.
|
|
|
| Back to top |
|
 |
Alan Bellingham Guest
|
Posted: Sun Aug 21, 2005 8:07 pm Post subject: Re: O_APPEND Help |
|
|
"LarryJ" <LarryJ33 (AT) ev1 (DOT) net> wrote:
| Quote: | I had to manually add the n to the end of each line to make this work.
|
So your complaint wasn't that the data was appended to the end of the
file, but that the 'n's weren't being written when you didn't do it
yourself?
Alan Bellingham
--
Me <url:mailto:alanb (AT) episys (DOT) com> <url:http://www.doughnut.demon.co.uk/>
ACCU - C, C++ and Java programming <url:http://accu.org/>
The 2004 Discworld Convention <url:http://dwcon.org/>
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|