const char *p1 = str.data();//返回地址,char*末尾不加'\0'const char *p = str.c_str();//返回地址,char*末尾加'\0'string ss = p1;//char*转字符串