diff options
Diffstat (limited to 'Dereferencing is to access the data behind a pointer.md')
-rw-r--r-- | Dereferencing is to access the data behind a pointer.md | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Dereferencing is to access the data behind a pointer.md b/Dereferencing is to access the data behind a pointer.md new file mode 100644 index 0000000..73cbeee --- /dev/null +++ b/Dereferencing is to access the data behind a pointer.md @@ -0,0 +1,10 @@ +[[Rust]] +[[Ownership]] +[[References are also immutable by default]] +[[Accessed data from dereferencing a pointer cannot be mutated]] + +--- + +The dereference operator is similar as in Go an asterisk. By dereferencing a pointer it is possible to access the data it points to. + +When you use the dereference operator in an assignment the variable has the same value as what the pointer holds.
\ No newline at end of file |