cplusplus:pointers_3
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
cplusplus:pointers_3 [2014/04/29 21:55] – [Pointer arithmetic] mithat | cplusplus:pointers_3 [2016/03/05 23:27] (current) – [Pointers 3] mithat | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== Pointers 3 ====== | ====== Pointers 3 ====== | ||
- | Pointers, arrays, arithmetic.((Portions loosely adapted from: FIXME)) | + | Pointers, arrays, arithmetic. |
===== Pointers and arrays ===== | ===== Pointers and arrays ===== | ||
Line 97: | Line 97: | ||
int *vPtr = v; | int *vPtr = v; | ||
- | for(int i = 0; i < 5; i++) | + | for (int i = 0; i < 5; i++) |
{ | { | ||
cout << *vPtr << endl; | cout << *vPtr << endl; | ||
Line 150: | Line 150: | ||
^ Operation | ^ Operation | ||
- | |< | + | |Increment |
- | |< | + | |Decrement |
- | |< | + | |Arithmetic |
- | |< | + | |Compound assignment |
valptr += 2; // points at 11</ | valptr += 2; // points at 11</ | ||
- | |< | + | |Pointer subtraction |
cplusplus/pointers_3.1398808539.txt.gz · Last modified: 2014/04/29 21:55 by mithat