I want to use a function that expects data like this:
void process(char *data_in, int data_len);
So it\'s just processing some bytes really
unsigned char
or signed char
is just interpretation: there is no conversion happening.
Since you are processing bytes, to show intent, it would be better to declare as
void process(unsigned char *data_in, int data_len);
[As noted by an editor: A plain char
may be either a signed or an unsigned type. The C and C++ standards explicitly allow either (it is always a separate type from either unsigned char
or signed char
, but has the same range as one of them)]