could anyone tell me how do i get the position of an element in a vector given the iterator.
for example: when i use the find() method, it returns the iterator which if dereferenced gives me the value.
but i want the position where the value i was lookin for is at.
vector<string>::iterator result;
result = find( v1.begin(), v1.end(), value);
now i want the index in the vector v1 at which value was found.
but im getting result (which is iterator) and if i do *result it gives me value again
pls help. its urgent
thankx