is there any vay to access iterator's index value without using another variable in the for loop?
serkan sendur 821 Banned Featured Poster
Recommended Answers
Jump to Post— minas1 1is there any vay to access iterator's index value without using another variable in the for loop?
#include <iostream> #include <vector> using namespace std; int main() { vector <int> vec; vector<int>::iterator iter; for(int i = 0; i < 5; ++i) vec.push_back(i); for(iter = vec.begin(); iter < vec.end(); …
All 3 Replies
Reply to this topic Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.