Unique Words Program

This program counts the number of times each word appears in an input text. The program is divided into three parts:

  1. The MyLine object, with the class definition in MyLine.h and the method implementation in MyLine.C.
  2. The WordList object, with the class definition in WordList.h and the method implementation in WordList.C.
  3. The main routine in Unique.C.
This is a typical situation: several .C files implement a program, and they are compiled separately, using .h files to communicate the variable definitions between files. A final compilation combines the pieces and forms a final executable.

A Makefile automates the process of building the excutable from the pieces. Placing the .h, .C and the proper Makefile in the same directory, typing make in this directory will rebuild the executably correctly.