Sorting 2 collections 
Author Message
 Sorting 2 collections

        I have 2 vectors vecA (objects in this collection are A's) and
vecB (B's are objects here). Class A has a defined ordering, while class
B does not. I would like to sort vecB based on the ordering of A -> i.e.
when vecA gets sorted and two elements of vecA say vecA[0] and vecA[2]
are swapped, i also want vecB[0] and vecB[2] to be swapped. In other
words, i would like to keep the pairing (by index) of the elements of
vecA and vecB the same before and after vecA gets sorted. Does anyone
know how to do this efficiently in STL?

Sun, 22 Apr 2001 03:00:00 GMT  
 [ 1 post ] 

 Relevant Pages 

1. A collection inside a collection inside a collection...

2. Sorting an STL-based collection

3. Sorting 2 stl collections

4. Sorted Collection in MFC

5. Populating collection Items within the collection

6. collection inside of a collection

7. Collections of collections

8. Fast sorting (sort of)

9. Quick sort vs. bubble sort

10. DefaulView.Sort enumerating rows not sorted????


Powered by phpBB® Forum Software