I need to find an element position in an std::vector to use it for referencing an element in another vector:
int find( const vector& whe
You probably should not use your own function here. Use find() from STL.
Example: list L; L.push_back(3); L.push_back(1); L.push_back(7);
list L; L.push_back(3); L.push_back(1); L.push_back(7);
list::iterator result = find(L.begin(), L.end(), 7); assert(result == L.end() || *result == 7);