I have a unsigned char*
. Typically this points to a chunk of data, but in some cases, the pointer IS the data, ie. casting a int
value to the unsigned char*
pointer (unsigned char* intData = (unsigned char*)myInteger;
), and vice versa.
However, I need to do this with a float
value, and it keeps giving me conversion errors.
unsigned char* data;
float myFloat = (float)data;
How can I do this?