I need to convert const char[] to uint8_t in C++. What is the best method
a)
const uint8_t* a = (const uint8_t*)"string";  // I hate this cast, but it works
b)
const uint8_t* a = reinterpret_cast<const uint8_t*>("string");  // is this OK, is it safe?
Why will this not work?
const uint8_t* a = static_cast<const uint8_t*>("string");  // will not compile
 
    