string str2 = "hello";
const char *str = str2.c_str(); //要加const,否则报错
c++字符串转换字符指针
最新推荐文章于 2023-10-15 21:31:35 发布
string str2 = "hello";
const char *str = str2.c_str(); //要加const,否则报错