C
crystal twix
Hi. I'm trying to understand what my professor says when he refers to
declaring a pointer, and seeing the operator precedence and seeing
what happens when we do things like
p++
*p++
(*p)++ etc,
but he starts out with this declaration
int *p = (int *)0;
Although my compiler does not complain, when I try to do something
like
cout << *p;
I get a Bus Error on the console (I'm using Xcode). What am I doing
wrong here? Thanks.
declaring a pointer, and seeing the operator precedence and seeing
what happens when we do things like
p++
*p++
(*p)++ etc,
but he starts out with this declaration
int *p = (int *)0;
Although my compiler does not complain, when I try to do something
like
cout << *p;
I get a Bus Error on the console (I'm using Xcode). What am I doing
wrong here? Thanks.