Skip to content

Latest commit

 

History

History
5 lines (3 loc) · 140 Bytes

File metadata and controls

5 lines (3 loc) · 140 Bytes

加法运算符优先级高于条件运算符,导致条件表达式错误

修改为

string p1 = s + (s[s.size() - 1] == 's' ? "" : "s");