Converting c pointer types
- by bobbyb
I have a c pointer to a structre type called uchar4 which looks like
{
uchar x;
uchar y;
uchar z;
uchar w;
}
I also have data passed in as uint8*. I'd like to create a uchar* pointing to the data at the uint8* so I've tried doing this:
uint8 *data_in;
uchar4 *temp = (uchar4*)data_in;
However, the first 8 bytes always seem to be wrong. Is there another way of doing this?