[stl] multimap => vector 시 map의 키 값으로 vector를 정렬하는 방법이 있을까요?
글쓴이: lunar2296 / 작성시간: 화, 2008/12/16 - 12:42오후
std::multimap<int, Obj> multimap_A;
std::vector<Obj> vector_Obj;
for( itr = multimap_A.begin() ; itr != multimap_A.end() ; ++itr )
vector_Obj.insert( itr->second );일 때, vector_Obj 를 multimap_A의 key 값으로 정렬해 줄 방법이 있는지요?
Forums:


http://www.sgi.com/tech/stl/M
http://www.sgi.com/tech/stl/Multimap.html
에 보면
Multimap is a !! Sorted !! Associative Container that associates objects of type Key with objects of type Data.
라고 써있습니다. 즉, 올리신 코드 그대로하면 정렬된 상태로 vector 에 들어갑니다. 뭔가 다른 것을 바라신 것인지..?