vector对象可以动态的增长,但是也会有一些副作用。
(1)不能在范围for循环中向vector对象添加元素。
(2)任何一种可能改变vector对象容量的操作,比如push_back,都会使该vector对象的迭代器失效。
string::size_type
vector<int> size_type
数组:size_t
vector<int>:: iterator it;
string::iterator it;
迭代器或者指针相减:difference_type ptrdiff_t