Hello
I am trying to convert an array of 8 uint8_t to 1 uint64_t.
But when I try to do the following it fails. Because I try to shift with 32.
But uint64_t has 64 bits and uint8_t has only 8 so this is possible?
So wy can't I do this?
Thank youCode:int main(void){ uint8_t bla[8]; uint64_t temp; temp = ((bla[3] << 32) | (bla[4] << 24) | (bla[5] << 16) | (bla[6] << 8) | (bla[7])); printf("0x%x\n", temp); }