Pointers sometimes have a bad vibe. But they are an important construct in C++. Today we talk about how to use them to reduce the amount of pain that they cause 😅 We cover what they actually are, their difference to references and how (and where) to use const correctly with pointers.
📚 As always, the script to the video lives here: https://github.com/cpp-for-yourself/supplementary-materials/blob/main/lectures/raw_pointers.md
Hope you enjoy this one! Please leave any suggestions below the video or tell what you liked about the video!
**Contents**
00:00 - Intro
00:47 - What are pointers after all?
01:55 - How to create pointers in the code
02:08 - The address operator
02:37 - How to get the underlying data?
03:34 - The arrow operator
04:27 - The main difference between pointers and references
05:14 - Pointers pointing nowhere
06:17 - Dereferencing a nullptr
06:58 - const with pointers
09:10 - Summary
Download
0 formats
No download links available.
Mastering C++ pointers: the pros and cons of (raw) pointers | pointer usage with const | NatokHD