最佳答案
我有:
unsigned char *foo();
std::string str;
str.append(static_cast<const char*>(foo()));
错误: invalid static_cast from type ‘unsigned char*’ to type ‘const char*’
这里用 C + + 风格转换的正确方法是什么?