I have variable input
type const std::string&
:
const std::string& input
Now I need to convert this to const unsigned char*
because this is the input of the function.
Unitl now I have correct code for converting:
reinterpret_cast<const unsigned char*>(input.c_str())
This works well, but in clang I got a warning:
do not use reinterpret_cast [cppcoreguidelines-pro-type-reinterpret-cast]
What is the correct way to change a string
or const char*
to const unsigned char*
?