How can I conver hexdecimal string to unsigned char bytes ?
std::string = "ffddaabb";
to
unsgined char[] = "\xff\xdd\xaa\xbb";
How can I conver hexdecimal string to unsigned char bytes ?
std::string = "ffddaabb";
to
unsgined char[] = "\xff\xdd\xaa\xbb";
This is not an unsigned char
"\xff\xdd\xaa\xbb"
The correct type you get by assigning this literal is a const char
pointer.
In order to get a single char you should do
unsigned char ch = 0x2A;