Is there any way I can create two variables that point to the same memory location, so that I can read same memory as int, float, char, any way I like?
I want something like this, only without pointer to f, so that I do not have to dereference every time I read/write to f.
char myArray[100];
float* f = (float *)&myArray[10];
I want to closest thing to C++'s reference in C.
I hope the question makes sense.
Edit: I read stream (4 Kb worth) of bytes from flash memory. This stream contains shorts, ints and floats. I know the locations of these ints and floats in the array. And I want to read/write the aforementioned ints and floats like they are ordinary variables.