I have a list of 100 unsorted items. Each item belongs to a group. The group to which the item belongs is simply an element of the item class.
Using C / C ++ I'm looking for the most efficient way to scan through a list of items, check which group they are in, and print the item on the screen. Here's a catch though. After an element from a group has been printed on the screen, I do not want to print more elements belonging to this group.
I use the pre STL compiler and the size of the executable is critical, so I don't want to start defining my own Hash classes.
source
share