I have a list of say 100 unsorted items. Each item belongs to a group. The group the item belongs to is simply a member of the item class.
Using C/C++ I'm looking for the most efficient way of scanning through the list of items, checking which group they are in and printing the item to the screen. Here's the catch though. Once an item from a group has been printed to the screen, I don't want to print any more items belonging to that group.
I'm using a pre STL compiler and the size of the executable is critical so I don't want to start defining my own Hash classes.