官方这么说:
The elements of a vector are stored contiguously, meaning that if v is a vector where T is some type other than bool, then it obeys the identity &v[n] == &v[0] + n for all 0 <= n < v.size().
满足 &v[n] = &v[0] + n
翻译过来就是说,vector里的元素是持续存储的。
阅读(936) | 评论(0) | 转发(0) |