I was playing with ripper's code and if I change it so that it outputs the address instead of the value by taking the * off of pIncre, then pIncre++ increments the address by 4,
Value pInt[0] is 007D0C70
Value pInt[1] is 007D0C74
Value pInt[2] is 007D0C78
Value pInt[3] is 007D0C7C
Value pInt[4] is 007D0C80
Value pInt[5] is 007D0C84
Value pInt[6] is 007D0C88
Value pInt[7] is 007D0C8C
Value pInt[8] is 007D0C90
Value pInt[9] is 007D0C94
Press any key to continue
Why is this?
How does it process arithmetic operations on a pointer?
I want to make sure I've got pointers straight, cause they are weird to me. For example:
int *pointerName;
My understanding of a pointer was that the "int" is related to the type of data that is in the memory location. And the "*" says that pointerName is a variable that can store a alphanum value such as "007D0C70".
, and you use the * operator to evaluate it as the value at that memory address like:
int x=5;
cout<<*&x;//outputs 5
PS. Is each element taking up four addresses?
How much memory is in an address, a byte?