unsigned char *에서 const char *로 C ++ 스타일 캐스트 나는 가지고있다: unsigned char *foo(); std::string str; str.append(static_cast(foo())); 오류: invalid static_cast from type ‘unsigned char*’ to type ‘const char*’ 여기서 C ++ 스타일로 캐스팅하는 올바른 방법은 무엇입니까? reinterpret_cast char *와 const unsigned char *관련이없는 유형으로 간주됩니다. 그래서 당신은 reinterpret_cast. 그러나 const unsigned char*비 const유형 으로 이동 하는 경우 const_cast먼저 사용해야 합니다. 또는 자격..