There was this question: Converting char [] to string
In addition to it, I had an additional question about the work of the String constructor (char *). What happens when calling such a constructor - is a separate memory area allocated for the String class into which the contents of the char * are copied?
Or is some sort of reference to the existing char * and the variable char * cannot be formed?
Those. a copy of the string char * gets into the variable of the String class - or does a certain pointer fall into a certain area of memory that needs to be saved?
const char txt[]="Пример"; char * b = &txt; String s(b);
std::string? - KoVadimchar * b = &txt;- this is already incorrect. - AnT