|
-
Jul 2nd, 2002, 07:47 AM
#1
Strings
'Mornin folks.
I just read another thread about comparing two strings. I haven't used C since MS VC 1.51. I dont recall a string type. Is this something new? Will it work like other languages? Does it no longer need a null terminator?
-
Jul 2nd, 2002, 08:55 AM
#2
Frenzied Member
There is a standard string class in C++. It's in the std namespace. There's no string class in C, obviously.
Harry.
"From one thing, know ten thousand things."
-
Jul 2nd, 2002, 11:30 AM
#3
Monday Morning Lunatic
As far as null terminators go...
...no, they don't need one any more, since the strings are stored by length (also making asking for the length a fast operation).
Unfortunately, I think there are situations when you use .c_str() to get a const char* pointer to the content of a string...when I get home and have access to a compiler (a good one, the ones at work are x centuries out of date) I'll check it out for you.
I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
-- Linus Torvalds
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|