const char *c_str();
char c[20]; string s="1234"; strcpy(c,s.c_str());
char * strc = new char[strlen(str.c_str())+1];
strcpy(strc, str.c_str());
(具体操作省略)
delete [] strc;
const char *c_str();
char c[20]; string s="1234"; strcpy(c,s.c_str());
char * strc = new char[strlen(str.c_str())+1];
strcpy(strc, str.c_str());
(具体操作省略)
delete [] strc;