cplusplus:pointers_1_slides
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_slides [2021/10/19 19:15] – [Pointer hardware model] mithat | cplusplus:pointers_1_slides [2021/10/19 19:23] – mithat | ||
---|---|---|---|
Line 6: | Line 6: | ||
Deitel, Harvey M., and Paul J. Deitel. " | Deitel, Harvey M., and Paul J. Deitel. " | ||
Mithat Konar\\ | Mithat Konar\\ | ||
- | March 28, 2019 | + | October 19, 2021 |
===== Introduction ===== | ===== Introduction ===== | ||
Line 61: | Line 61: | ||
===== Pointer syntax basics ===== | ===== Pointer syntax basics ===== | ||
- | ===== Declaration | + | ===== Pointer declaration |
* '' | * '' | ||
* Type of data being pointed to must also be indicated. | * Type of data being pointed to must also be indicated. | ||
Line 78: | Line 78: | ||
</ | </ | ||
- | ===== Declaration | + | ===== Pointer declaration |
* You can declare more than one pointer variable at a time: | * You can declare more than one pointer variable at a time: | ||
Line 100: | Line 100: | ||
* Most environments show base addresses as [[http:// | * Most environments show base addresses as [[http:// | ||
- | ===== Assignment | + | ===== Pointer assignment |
* Declare an integer variable '' | * Declare an integer variable '' | ||
Line 111: | Line 111: | ||
{{: | {{: | ||
- | ===== Assignment | + | ===== Pointer assignment |
* Declare an integer variable '' | * Declare an integer variable '' | ||
Line 130: | Line 130: | ||
- | ===== Assignment | + | ===== Pointer assignment |
- | * Chaning | + | * Changing |
<code cpp> | <code cpp> | ||
Line 143: | Line 143: | ||
</ | </ | ||
- | ===== Initialization | + | ===== Pinter initialization |
* Local pointer variables in C++ are not automatically initialized. | * Local pointer variables in C++ are not automatically initialized. | ||
* Uninitialized pointers point to arbitrary memory. //Very dangerous.// | * Uninitialized pointers point to arbitrary memory. //Very dangerous.// |
cplusplus/pointers_1_slides.txt · Last modified: 2021/10/19 19:29 by mithat