What is this error please explain in hindi if possible

invalid conversion from ‘const char*’ to ‘char*’ [-fpermissive

hello @dhruvilcodes

tum kahi pe constant string declare kar rahe ho kya like
char * c= “abc”; ?

string sub=s.substr(i,j); char *a=sub.c_str(); esa kar raha hoon

yaha pe c_str() function const char * type ka pointer return karta hai, jisko tum char * (c pointer) mein store kar rahe ho isiliye error aa raha hai.

char * c= (char * ) sub.c_str(); // aisa karo

what is const char * ???

const is keyword that is used to specify that its value will not be changed.
so here
const char * indicates that the string (returned by c_str ) is non modifiable and thats why when we are storing it in char * it is showing error.

we need to explicity type to char * to make modifiable