I have code that looks like this:
char* talk[516] = {(char*)1};
#define testValue (*(int*)talk[0])
I receive a null pointer exception when the following line of code is then called.
testValue = 0;
Why is that? Haven't all value of the talk[]
been initialised?
EDIT
What I want to do is, there are 516 number values (float
s and int
s) which are stored in char*
array. testValue
should point to the int
value that is stored in the first element of the array. The next value along might be #define testValue2(*(float*)talk[1])
.