std::vector 的 size() 是 unsigned 类型,若在代码中使用类似 i < s.size() - 1 可能会误判。
std::vector
size()
unsigned
i < s.size() - 1