The basic concept of C++ string type
This article mainly explains "the basic concept of C++ string type". The content of the explanation in the article is simple and clear, and it is easy to learn and understand. let's study and learn the basic concept of C++ string type.
To use the string type in the C++ string type, you must first include the relevant header file
# include
For example, the following is the character array defined in the previous section
# include string st ("The expense of spirit\ n")
The length of st is returned by the size () operation without terminating null characters.
Cout