0
Difference between character array and string...????
2 Réponses
+ 11
A character array is just a character array, while a string is a class which contains a character array, and has built-in methods to help you manage that character array. You may choose to allocate memory for a character array on the stack or the heap, while strings are automatically managed for you.
https://stackoverflow.com/questions/1287306/difference-between-string-and-char-types-in-c
+ 2
string is a C++ generic type of the <string> header (with a variable size)
the array of chars with ending '\0' is the old C 'string' type (with an specific max size)