"does not work if I initilize the pointer to a value."
http://www.csee.umbc.edu/201/spring0...ures/pointers/
Specifically, I have no idea what "int *x = (int *)3 ; does . It treats 3 as type int * which doesn't make any sense to me, other than the obvious. What it does in memory, I don't know. Dameon may have been correct in his first post, but I'm not sure either.
also:
int z = (int)*x+*y;
would not work the way you want if y was type float. I'm pretty sure only *x is typecasted to an int. You should put the whole expression in parentheses,
int z = (int)(*x+*y);