ancient dragon told me something but dont know how to user it !

translate(word.begin(), word.end(), word.begin(), tolower);

It's transform, not translate. Be sure to include the <algorithm> header, and keep in mind that the way you're doing it might not work. But it probably will, so no worries at this point. Also, unless you want to change word so that it's a std::string object, you can't use the begin and end member functions. This will work (but you also have to include <cstring>:

transform ( word, word + strlen ( word ), word, tolower );

I put it there but still dont work !!

it is my code right or wrong?

Hope it's not too late but I would recommend you do some research in this [removed link]. Wish this be useful to you...

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.