cplusplus:pointers_1_slides
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | Next revisionBoth sides next revision | ||
cplusplus:pointers_1_slides [2021/10/19 19:20] – [Assignment] mithat | cplusplus:pointers_1_slides [2021/10/19 19:23] – mithat | ||
---|---|---|---|
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 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