We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Hi everyone
I m workin on AT89c52 using C but i am facin a problem with pointers.I am declearing a pointer
unsigned char *ptr; unsigned int Address; ....... ......... void main( void ) { ...... ....... ptr = 0x2233; // Its works Address = 0x2233; ptr = Address; // error 214 illigel pointer //operation ........ }
why is this error
why is this error If you read the error message, you will see what the problem is: Address isn't a pointer...
If this does not help you to solve the problem, you should start with learning C basics.
You also need to understand that pointers are somewhat "special" in C51, to cope with the 8051's somewhat "special" memory architecture: http://www.keil.com/support/man/docs/c51/c51_le_ptrs.htm
If you didn't realise that the 8051 has a somewhat "special" memory architecture, then you also need to do some basic study of the 8051 architecture:
www.8052.com/.../120112 http://www.8052.com/tutorial
For some suggested books on both programming in general and the 8051 in particular, see: http://www.keil.com/books/