Re: Cocoa-dev Digest, Vol 2, Issue 1018
Re: Cocoa-dev Digest, Vol 2, Issue 1018
- Subject: Re: Cocoa-dev Digest, Vol 2, Issue 1018
- From: Ben Kazez <email@hidden>
- Date: Sat, 02 Jul 2005 10:25:37 -0400
On Jul 1, 2005, at 4:12 PM, Frederick C. Lee wrote:
I read that C strings are null terminated whereas C++ strings are
not.
??
try
std::string my_string("with_c_string_initializer");
const char* my_c_string = my_string.c_str();
This doesn't mean that the internal representation is null-
terminated. You're not guaranteed anything about the implementation
of C++ strings, although you are guaranteed some big-O things about
performance. This goes for all the STL classes, I believe (can
someone check me on that?).
Ben
--
Ben Kazez
http://www.benkazez.com
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden