int y;
int *x = &y;
cout<<<" is not "<<<" minus one"; The only time when adding one to a pointer is guaranteed to produce the exact next byte is when you perform pointer arithmetic on chars. This can be useful if you have a block of memory and want to treat it as a block of bytes. To access a particular byte, just cast the memory to a char before performing any pointer arithmetic.
Author : Vishesh
0 nhận xét:
Post a Comment