Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and beauty - What "+=" operators does the iterator support?
What "+=" operators does the iterator support?
It's possible. Iterators can use dereference operators (* operators) to access elements (similar to pointers) pointed by iterators: * ITER = 0;; //Set the value of the element pointed by iter to 0 ++ ITER;; //Point to the next element * ITER =1; //Set the value of this element pointed by iter (the next element of the element just set to 0) to 0. An array is a composite data type of type name, identifier and dimension. The dimension of an array must be defined by a constant expression with a value greater than or equal to 1 (including integer literal constants, enumeration constants and integer const objects initialized with constant expressions). The operations of arrays are accessed through subscript operators. When accessing an element with a subscript, the type of the array subscript is size_t, which is similar to an iterator of a vector. Pointers can also be used to traverse arrays.