Help with ADT Implementation

Hello, I am trying to finish my assignment which requires me to play the role of an ADT implementor. I am to implement an ADT into a censoring program with the previous code provided. I've done all I can, and for some unknown reason my program isn't censoring all the words past the first.

For example:
----------------------------------------
John
Jane
===

John. Jane.

@@@@ Jane
----------------------------------------

Jane should be censored along with john.
I am ONLY suppose to implement my ADT onto this file. Everything else is provided for and should not be touched.

#ifndef MESSAGE_H#define MESSAGE_H#include <string>#include <iostream>//// A message is a single long string// containing \n characters separating the lines.// A message can be divided into words and sentences.struct Message {
/*
* Add a line of text (and a line-terminating '\n') to the message.
*/void addLine (std::string line);
/*
* How many characters are in this message?
*/int length() const;
/*
* Print a message to the indicated output
*/void print (std::ostream& out);
/*
* Return true if the character at position pos is the first character
* of a word.
*/bool wordBeginsAt (int pos) const;
/*
* Return the string comprising the word that begins at
* position beginningAt.
*/
std::string extractWord (int beginningAt) const;
/*
* Replace by '@' all characters (except '\n') of the sentence
* that begins at or before position pos and that ends at or after
* that position.
*/void censorSentenceAt (int pos);
/* ********************************************************** */private:
// The following are considered to be "hidden" or private. No code outside// of message.cpp should access the data below.
std::string messageText;
};
#endif

#ifndef DICTIONARY_H#define DICTIONARY_H#include <string>#include <vector>/**
* A Dictionary is a collection of words. The primary operations
* are adding new words to the dictionary and checking to see if some
* word is already in there.
*/struct Dictionary {
/*
* Add a word to the dictionary
*/void add (std::string word);
/*
* Check to see if a word is in the dictionary
*/bool contains (std::string word) const;
/* ********************************************************** */// The following are considered to be "hidden" or private. No code outside// of dictionary.cpp should access the data and functions below.
std::vector<std::string> words;
};
#endif