cplusplus:pointers_1
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
cplusplus:pointers_1 [2018/02/24 20:51] – [Pointer syntax basics] mithat | cplusplus:pointers_1 [2018/02/24 23:53] – [Pointer variables] mithat | ||
---|---|---|---|
Line 11: | Line 11: | ||
===== Pointer variables ===== | ===== Pointer variables ===== | ||
- | You can think of a **pointer variable** as a variable that stores the address of some other variable. | + | You can think of a **pointer variable** as a variable that stores the base address of some other variable. |
And? | And? | ||
Line 30: | Line 30: | ||
If we were now to ask what the address of '' | If we were now to ask what the address of '' | ||
- | So, now let's say that (for whatever reason) we wanted to create a variable to store the address where '' | + | So, now let's say that (for whatever reason) we wanted to create a variable to store the address where '' |
^ Variable name ^ Memory location ^ Memory contents across all 8 bytes (64 bits) ^ | ^ Variable name ^ Memory location ^ Memory contents across all 8 bytes (64 bits) ^ | ||
Line 177: | Line 177: | ||
cout << y; // prints 7</ | cout << y; // prints 7</ | ||
- | Think of the indirection/ | + | You can think of the indirection/ |
< | < |
cplusplus/pointers_1.txt · Last modified: 2019/03/28 16:24 by mithat