EDIT: note that the body of this answer doesn't matter according to the comments he suggested
The theory of the other answers is fine, but it probably won't help you. The actual problem is what you wrote:
uint8_t* point = ((uint8_t*)array)+1;
When you should write something like
uint8_t* point = (uint8_t*)(array+1);
because you need to increase the pointer as a pointer to the appropriate type (so the increment operation will add the size of the element) before you draw it on something else.
But one may ask if you really intend to have a byte pointer to a 32-bit value. Perhaps you intend to access it in different ways (beware that the byte order will vary by system!). Or perhaps you intended to point to a pointer to a 32-bit value, which in turn is a pointer to an 8-bit value somewhere else ...
Chris stratton
source share