turns out this is just another case of \"c++ is not c blues\"
What I want
const char hex[16] = \"0123456789ABCDEF\";
>
I believe the question is a bit unclear: In C, the qoted initialization:
static const char hex[16] = "0123456789ABCDEF";
is legal. In C++, it is not. So it is one of the pieces of code, that fail (fortunately at compile time), when you move from C to C++.
It would be nice to have a way to force string literals without termination \0 byte. Something like:
static const char hex[16] = "0123456789ABCDEF\!0";
where the \!0 at the end tells the compiler to not zero-terminate the string! \! or even \!0 anywhere else in the string would behave unmodified, so just put out a literal ! or !0 .