there is a very good reason you are having problems here. Your data is dynamic! the string class is holding a pointer to a char buffer that was dynamically created. You can't just save that pointer out to a file and expect it to work. Try something like adding a Save() function on the Word object. Like this maybe:
Code:
void Word::Save(ofstream &fout)
{
fout << str.c_str();
}
and then for reading back in:
Code:
void Word::Restore(ifstream &fin)
{
char tempstr[100];
fin.read(tempstr,99);
str = tempstr;
}