I have an uint32_t*
pointer charData
set to data that is stored in LE order.
When I simply dereference the pointer and store it in a uint32_t
it is interpreted falsely (i.e. as Big Endian).
What's the best way to rotate the bytes in c++?
unsigned char arr[4] = {0x02, 0x11, 0x01, 0x6B };
unsigned char* charData = arr;
uint32_t value = *((uint32_t*) charData);