. has a higher priority than unary * .
*ItStr.c_str() looks like you said *(ItStr.c_str()) .
You can, of course, just use ItStr->c_str() , since (*x).y equivalent to x->y (at least for pointers and iterators, you can, of course, overload the operators for your own types so that they were incompatible, but you would be crazy to do this).
source share