I'm new to C.
I know this has been asked in many forms but mine is a little unique...I guess. I have an unsigned short pointer.
6 unsigned short *pt;
7 pt = myArray[0];
The array is declared as such: const unsigned short myArray[1024] and is an array of hex numbers of the form 0x0000 and so on.
I try to compile, it throws these errors:
myLib.c:7: error: data definition has no type or storage class
myLib.c:7: error: type defaults to 'int' in declaration of 'pt'
myLib.c:7: error: conflicting types for 'pt'
myLib.c:6: note: previous declaration of 'pt' was here
myLib.c:7: error: initialization makes integer from pointer without a cast
any ideas of what's going wrong?
Thanks, Phil
myArrayis simply an array of const unsigned shorts, not "hex numbers".