Well, at least now we know you're talking about C++ and not C.
Code:
else if else if (word1.length() > word3.length() > word2.length())
I'm hoping the 'else if else if' is just a typo.
With regard to the condition, you need to separate it a bit.
Code:
if (word1.length() > word3.length() && word3.length() > word2.length() )