remember you cannot use the assignment operator with c_style strings. So if you want to assign the value of word2 to word and you do not initialize word with word2, as in William's example, you need to use strcpy():

strcpy(word, word2.c_str());