?
=?ISO-8859-1?Q?Ney_Andr=E9_de_Mello_Zunino?=
Hello.
To find the position of an element within a collection, I currently
follow these two steps:
1. obtain an iterator to the element (i.e. find it)
2. use std::distance with coll.begin() and the previous iterator
This works, but I still would like to know if there is a better way
which I might be overlooking.
Thank you,
To find the position of an element within a collection, I currently
follow these two steps:
1. obtain an iterator to the element (i.e. find it)
2. use std::distance with coll.begin() and the previous iterator
This works, but I still would like to know if there is a better way
which I might be overlooking.
Thank you,