I've array of char [HEX]. I've no idea how to convert them to integer. Anyone guide me an idea?
My Coding:
char Hex[] = {'01', '0D'};
int a = (int(Hex[0]) >> 8)+ int(Hex[1]);
int b = (Hex[0] << 8) | Hex[1];
cout << "a: " << a << " b: " << b;
Output:
a: 68 b: 12612
I suppose output should be:
269