Smart Pointers vs Raw Pointers in Modern C++
-
Hi everyone,
I'm fairly new to C++ coming from a Python background and I'm struggling to understand when to use smart pointers versus raw pointers. I understand the general principle that smart pointers handle memory automatically, but I'm not sure when it's actually appropriate to use a raw pointer in modern C++ and whether there are cases where smart pointers would be overkill or cause issues.
Any practical guidance on how to think about this decision would be really appreciated!
-
Have you taken a look at this yet? This article can also be summarized using AI if the introduction seems too complicated.
Side note: I hope there isn't a casino link coming up.
-
@Anon-81275 sagte in Smart Pointers vs Raw Pointers in Modern C++:
Side note: I hope there isn't a casino link coming up.
Ich wette gegen dich

-
Gut Ding will eben Weile haben.
