string C++

A string is a variable-length sequence of characters.

Table 1 Ways to initialize a string

string s1;
string s2(s1);
string s2=s1;
string s3(“value”);
string s3=”value”;
stirng s4(n,’c’);

Table 2 Operation on a atring

os<

猜你喜欢

转载自blog.csdn.net/ssf_cxdm/article/details/81412191
今日推荐