 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
LarryJ Guest
|
Posted: Thu Aug 18, 2005 5:18 am Post subject: write help |
|
|
I need a version of the write( ) function that I can use with an AnsiString.
I am writing to a text file.
Like this, write( AnsiString );
Does that exist.
Thanks
|
|
| Back to top |
|
 |
LarryJ Guest
|
Posted: Thu Aug 18, 2005 6:55 am Post subject: Re: write help |
|
|
I figured this out by using AnsiString .c_str()
"LarryJ" <LarryJ33 (AT) ev1 (DOT) net> wrote
| Quote: | I need a version of the write( ) function that I can use with an
AnsiString. I am writing to a text file.
Like this, write( AnsiString );
Does that exist.
Thanks
|
|
|
| Back to top |
|
 |
Remy Lebeau (TeamB) Guest
|
Posted: Thu Aug 18, 2005 7:06 am Post subject: Re: write help |
|
|
"LarryJ" <LarryJ33 (AT) ev1 (DOT) net> wrote
| Quote: | I need a version of the write( ) function that I can use with
an AnsiString. I am writing to a text file.
Like this, write( AnsiString );
|
You don't need it. Simply use the AnsiString's c_str() method to get a
pointer to the raw char* data and then write() it directly:
AnsiString s = "whatever";
write(iFile, s.c_str(), s.Length());
Gambit
|
|
| 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
|
|