方式 | 表明 |
string s1; | 创建空字符串 |
string s2 = "hello world"; | 创建一个内容为“hello world”的字符串(常用) |
string s3("hello world"); | 创建一个内容为“hello world”的字符串 |
string s4 = s2; | 用一个现成的字符串 s2 ,初始化另一个字符串 s4 |
欢迎光临 ToB企服应用市场:ToB评测及商务社交产业平台 (https://dis.qidao123.com/) | Powered by Discuz! X3.4 |