BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

O_APPEND Help

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (Language C++)
View previous topic :: View next topic  
Author Message
LarryJ
Guest





PostPosted: Thu Aug 18, 2005 6:54 am    Post subject: O_APPEND Help Reply with 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
LarryJ
Guest





PostPosted: Thu Aug 18, 2005 9:34 pm    Post subject: Re: O_APPEND Help Reply with quote



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





PostPosted: Sun Aug 21, 2005 8:07 pm    Post subject: Re: O_APPEND Help Reply with quote



"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
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (Language C++) All times are GMT
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.