I want to access starting address of the array that is maintained by the string class.
string str="hey";
char* pointer=(char*)str.c_str();
Is the pointer pointing to the address of the array(maintained by the string class)? or string class will create a new array from dynamic memory and copy the existing string into it and return it's address?
If this is not the right way, then how to access the starting address of the array that is maintained by the string class?