I am trying to store the character at an address in a variable, but I have a compile error ( invalid type argument of unary ‘*’ (have ‘int’)).
int address = 4000;
char character = (char) *address
Why doesn’t this code dereference the pointer to store the character at memory location 4000 and how can I fix it? Thanks.
Syntactically, you are looking for
Whether this will do anything useful is another matter…
Some issues to ponder:
intmay or may not be wide enough to represent every valid address (on my system, it isn’t).