Converting string into constant char *

why are we converting it in strtok using str_c when string could function similarly without converting it into const char *??

because strtok accepts only const char*

this is prototype of strtok
char * strtok ( char * str, const char * delimiters );

you can see it in documentation
http://www.cplusplus.com/reference/cstring/strtok/

i hope this helps
if yes hit a like and don’t forgot to mark doubt as resolved :grinning:
if you have more doubts regarding this feel free to ask