Reputation: 162
So I have a basic vector iterator, which looks like:
for (std::vector<string>::iterator i = vec.begin(); i != vec.end(); ++i)
{
// Need the index here
}
I've tried using &i
but that just returns true. I need to return the index. Would I need to create my own integer?
Upvotes: 4
Views: 6033