字符串转字符数组指针

string a=“abc”;

char *s = (char*) a.c_str();

char *s = (char*) a.data();

猜你喜欢

转载自www.cnblogs.com/chengsheng/p/10703202.html