string a=“abc”; char *s = (char*) a.c_str(); char *s = (char*) a.data(); 转载于:https://www.cnblogs.com/chengsheng/p/10703202.html