View Single Post
edon1337
Penguin Enthusiast
Join Date: Jun 2016
Location: Macedonia
Old 11-22-2018 , 11:13   Re: [Off-Topic] C++ Game
Reply With Quote #23

Quote:
Originally Posted by KliPPy View Post
Among some other minor syntactic differences (don't think of it too much for now, or just search if you are interested), the main one is that the reference has to be valid, i.e. can't be nullptr. You don't have to think about or check if a pointer is null when using references, making for better code. If you can use a reference, always use it over a pointer; Underneath they are the same thing.
There's hardly ever a need for raw pointers in modern C++. It's usually only used for performance critical code and implementation details.
Thanks for the explanation.
__________________
edon1337 is offline