I got index of biggest element in a vector by using:
std::max_element(grey.begin(),grey.end());
now I need that iterator to use for calculations and also as the iterator for some other vector. How can I convert an iterator into int or double type and how can I use it as an iterator for some other vector?