const char * 转换为char*时间:2022-12-19 09:16:34可以用const_cast const char* aa = "this is a const string."; char* bb = const_cast<char*>(aa); return 0; 更多const_cast的用法如下: http://en.cppreference.com/w/cpp/language/const_cast