I have read in a couple of places (these forums included) that Strings in C and C++ are considerably different.
Can someone tell me what those differences are?
I believe due to historical reason, some commercial C compiler comes with library that does have a string class but all those are non-standard.
Then Standard C++ came along and come out with a string class. This is the standard. But in life, it is not always a bed of roses isn't it ? What if in your work, you need to maintain legacy C code where they do not have string class during their times ?
So to conclude, learn both array of char and also the C++ string class :)
"Generates a null-terminated sequence of characters (c-string) with the same content as the string object and returns it as a pointer to an array of characters."
In C every string is terminated by... some character (null character \0?).
If you intend to do a lot of string manipulation for your new C++ program, please use the Standard C++ string class. You will never feel the "pain" those old C coders have during their times when they don't have a proper Standard C string functions to use. Some of the built their own some use commercial C compiler and all are non-standard.
A lot of errors are also attributed to the improper use of array of char or char* for those who attempt to do it the "raw" way without using the C string functions like strcat, strcpy etc.