与迭代器不同的是,指针用于指向单个对象,而迭代器只能用于访问容器内的元素。
Unlike iterators, Pointers can be used to point at single objects. Iterators are used only to access elements in a container.
在使用下标访问数组时,实际上是对指向数组元素的指针做下标操作。
When we subscript an array, we are really subscripting a pointer to an element in that array.
在使用下标访问数组时,实际上是对指向数组元素的指针做下标操作。
When we subscript an array, we are really subscripting a pointer to an element in that array.
应用推荐