如下 #include <string> int a = 100; const char* b = std::to_string(a).c_str(); char *c = const_cast<char*>(b);//去掉const属性