int sum = accumulate(vec.cbegin(), vec.cend(), string("")); //泛型,跟上面几乎一样
文章中部,不是 int sum 而是 string sum
虽然有点小错误,但是无所谓,谢谢楼主的好文!