IndexOfSmallestElement = distance(begin(EachRowDistance), smallest);
In the above code when I call a distance algorithm, what will be the initial index of a vector? Does the above code return index starting from 0 or 1?
vector.size() returns total number of element in its container, likewise does the above code return a index starting from 0 or 1?
Example
vec = {1,2,3,4,5}
In the above code is IndexOfSmallestElement 0 or 1 ?
Aucun commentaire:
Enregistrer un commentaire