Series Article of cpp -- 16

string 访问和添加元素

Posted by OUC_LiuX on October 28, 2021

string.at(idx), string[idx] 的返回值是 char 型;
实测 string.append(char ch) 添加 char 型元素会出错,建议使用 += char 添加元素到当前字符串。