cplusplus:pointers_2_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_2_slides [2021/10/19 19:40] – [Calling functions by reference] mithat | cplusplus:pointers_2_slides [2021/10/19 19:42] – [Calling functions by reference] mithat | ||
---|---|---|---|
Line 66: | Line 66: | ||
* Syntax in function invocation (e.g., '' | * Syntax in function invocation (e.g., '' | ||
- | ===== Calling functions by reference | + | ===== Example |
<file cpp cube-by-reference.cpp> | <file cpp cube-by-reference.cpp> | ||
/** Cube a variable using pass by reference with a pointer. */ | /** Cube a variable using pass by reference with a pointer. */ | ||
Line 104: | Line 104: | ||
* A **constant pointer** is a pointer whose value cannot change. | * A **constant pointer** is a pointer whose value cannot change. | ||
- | * Constant pointers store a memory location that cannot be changed. | + | * Constant pointers |
* Must be initialized when declared. | * Must be initialized when declared. | ||
- | * Use the '' | + | * '' |
<code c++> | <code c++> |
cplusplus/pointers_2_slides.txt · Last modified: 2021/10/19 19:46 by mithat