[C++] Iterator
·
Algorithm/Algorithm (문제풀이)
What's Iterator? Container를 순회하는 포인터. When To Use? Convenient Programming loop without [] operator or minding 'range' Reusabililty we can reuse iterator when to change data container Dynamic add & remove (1) ⭐ 범위 신경쓰기 싫다. index 극혐이다. #include #include using namespace std; int main() { // Declaring a vector vector v = { 1, 2, 3 }; // Declaring an iterator vector::iterator i; int j; cout