🚀 "With great power comes great responsibilities" - said no one who uses pointers in C++ and seg-faulting your computer. In this video, we will demystify pointer, shared pointers, and references in C++, as well as giving exceptional advice on when you should use these constructs.
🖥️ Starting from the foundations, we explain how pointers in most languages are essentially just an offset to the virtual memory of your machine, and how you should dereference and delete pointers. We also look at how references are very similar to pointers, helping you avoid expensive copies with nicer-to-use semantics. Lastly, we will go over how std::unique_ptr, std::shared_ptr, and std::weak_ptr differ, and how you should use all of them!
👨💻 If there are any questions about pointers in C++, feel free to comment them 🔥
Looking forward to seeing how many of you have crashes your programs with a null pointer dereference👊
#cpp #c++ #pointers #smartpointers #memory #references
🔗🔗🔗🔗Important Links🔗🔗🔗🔗
std::shared_ptr and std::weak_ptr article: https://iamsorush.com/posts/weak-poin...
📱📱📱📣📣Socials📣📣📱📱📱
discord - / discord
twitter - / codingwithmat
On this page of the site you can watch the video online How SMART Pointers Work in C++ with a duration of hours minute second in good quality, which was uploaded by the user Coding with Mat 31 July 2024, share the link with friends and acquaintances, this video has already been watched 627 times on youtube and it was liked by 33 viewers. Enjoy your viewing!