C++ string 转 char* string 转到 char* char name[20]; string sname=GatherName[n]; strcpy(name,sname.c_str());