Need of type casting?

c_str() returns char* then why we specifically type-casted
in
=> strtok((char*)str.c_str(), " ");

this is my recently reply take a look at this

if you have any doubts you can ask here