"Bo Sun" <b0*****@cs.tamu.edu> wrote in message
news:Pi*******************************@unix.cs.tam u.edu...
hi:
please take a look at the following code:
void* vp;
int vp_test = 20;
vp = & vp_test;
((int*&)vp) ++;
how to interpret ((int*&)vp) ++?
thanks,
bo
int *& is a reference to a pointer to int. After the cast, you've got
something that's referring to (i.e. is an alias for) a pointer to int. You
then increment that pointer by the size of one int (4 bytes on most
architectures). The result is then simply discarded since you do nothing
with it.