Lab 10: Using the STL Set

Due at the next lab session

Back in lab 3, we made a very slow spell checker using a linked list. This was not really an ideal data structure for the purpose. However, at tree provides fast search, and should spell check in a very reasonable amount of time.
For lab 10, modify lab 3 (or create a new program that does the same thing) so that you can use an STL set for spell checking. Although STL does not have any containers with tree in the name, set and map are commonly implemented using balanced binary search trees. Load the dictionary into an STL tree, and spell check a large file, such as you can download here. The spell check should not take a long time to run.
The "count" method is used on STL trees to check membership, and returns a 0 or 1 for the count (since the set contains only unique items). Because the C++ string already supports comparison, it can be used in an STL tree without defining any additional functions.