可以用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
时间: 2024-10-19 07:44:25
可以用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