string
可以通过printf输出
1
2string str = "abcd";
printf("%s\n",str.c_str())It can use operator ‘+’ to add two string variable
1
2stirng str1 = "abc", str2 = "xyz", str3;
str3 = str1 + str2;
-Two string type variables can be directly compared using ==, <>, and the comparison rule is alphabet order.
1 | stirng str1 = "abc", str2 = "xyz"; |
