10 Oct
2008
10 Oct
'08
12:31 p.m.
Ramesh escribió:
Hi Joaquin,
Supposing I have a container having three unique keys, Is there a way I can print data sorted by one of they keys? At the moment I tried a raw dump - it shows fields based on the first key (which is key1).
Hi Ramesh, Just use the iterators provided by the second or third index. For instance (not compiled, beware typos): for (MyMap::index_iterator<Key2>::type it = MyContainer.get<Key2>().begin(), itend = MyContainer.get<Key2>().end(); it != itend;++it) { cout << it->Key1; cout << it->Key2; cout << it->Key3; } Joaquín M López Muñoz Telefónica, Investigación y Desarrollo