#include #include #include #include #include #include struct word_counts { char word [30]; int count; int len; }; vector words [26]; void add (char *s); int main (void) { char s[100], *ptr; int i, j; vector tmp; while (cin.getline (s, 100)) { for (i = 0; i < strlen (s); i++) s[i] = tolower (s[i]); ptr = strtok (s, " ,!?."); while (ptr) { add (ptr); ptr = strtok (NULL, " ,!?."); } } for (i = 0; i < 26; i++) { for (j = 0; j < words [i].size (); j++) { if (words [i][j].count > 1) { tmp.push_back (words [i][j].word); // cout << words [i][j].word // << " (" << words [i][j].count // << ")"<