#include // the next include is needed for ifstream #include // the next include is needed for exit. #include // the next include is needed for strtok #include // SomeUniqueWords.C // burton rosenberg 1 April 1997 // This program reviews arrays of pointers to strings, // the use of new, and the string library, in particular, // strtok, strlen, strcpy and strlen. char * DELIMIT = " \t\n" ; const int BUFFER_N = 500 ; const int WORDS_N = 100 ; // number of unique words to track void processWord( char * a[], int aSize, char * oneWord ) { int i ; i = 0 ; while ( (i < aSize) && // short-circuited AND! (a[i] != NULL) && (strcmp(a[i], oneWord) != 0) ) { // if we are here, then (1) i is a valid array index, // (2) the entry a[i] points to a string and (3) that // string does not equal oneWord i++ ; } // When we are here, then whiel CONDITION is false. // Using DeMorgan's Thm', then: // ASSERT: i>=aSize OR a[i]==NULL OR a[i] equals oneWord. // We are only interested in the case a[i]==NULL (assuming // i < aSize). if ( i