C_str() function use

Please explain me the use of c_str , I couldn’t understand it in the above video . It says to access the underlying array we use this function. Please elaborate a little for me.

hi @jayasmit98

you can see in documentation the syntax of strtok is

char * strtok ( char * str, const char * delimiters );
as you can see it accept char string (str) and also return char*

but we have string as argument
so for that we convert string to char* using c_str (as internally string is character array so we can say we are accessing underlying character array)