vector<int> v; // ... // Traverse all container, from begin() to end() for(vector<int>::iterator it = v.begin(); it != v.end(); it++) { // ... *it++; // Increment the value iterator is pointing to }
for構文にキレイにiteratorをつめこんだタイプ。
vector<int> v; // ... // Traverse all container, from begin() to end() for(vector<int>::iterator it = v.begin(); it != v.end(); it++) { // ... *it++; // Increment the value iterator is pointing to }
for構文にキレイにiteratorをつめこんだタイプ。