这样的语句不支持。因为char*类型不支持+运算符
string s = "abc" + "def";
这样的语句支持,因为string支持+运算符,而本例使用了ss,即string类型,支持了+运算符
string ss = "";
string s = "abc" + ss + "def";
很有数学定义的味道
这样的语句不支持。因为char*类型不支持+运算符
string s = "abc" + "def";
这样的语句支持,因为string支持+运算符,而本例使用了ss,即string类型,支持了+运算符
string ss = "";
string s = "abc" + ss + "def";
很有数学定义的味道