We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
加法运算符优先级高于条件运算符,导致条件表达式错误
修改为
string p1 = s + (s[s.size() - 1] == 's' ? "" : "s");