Maybe A Cast Problem?

Ok I have this code, which I want it convert the string answer into all lowercase letters. I'm using strlwr which you have to use a character array, but when I try to use a character array, it can't be a string(obviously) but when I check if it equals "roll" it doesn't work.

Anyway, i'm not too sure about how to use a cast in this situation, and I would rather not have to, but if it is the only way to get around this, I guess it will have to do.

>std::for_each(myStr.begin(), myStr.end(), tolower);
>std::transform( str.begin(), str.end(), str.begin(), tolower );
Both of these contain a potential ambiguity that arises due to multiple overloads of tolower in the presence of locales. The chances of hitting the ambiguity are pretty good, even though many compilers will do the right thing. A better solution is to provide a wrapper around tolower that explicitly calls the correct overload: