const char * 转换为char*

可以用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

你可能感兴趣的:(const char * 转换为char*)