I have a question about pointers. I want to take the address stored in a pointer and store it in an unsigned char... yeah, it's not big enough, i know, but it works for what im doing i think. Only problem is, everything I try yields the wrong result. I have two variables, ip and main_mem, both unsigned chars:
and then I tried:Code:*ip = (unsigned char *) *main_mem + 1;
So if this doesn't work, how do i do it? If more source is needed or if anyone wants an explanation, let me know. Thanks guys!!!Code:memcpy ((unsigned char *) ip, (unsigned char *) main_mem);