What is the Difference Between a Pointer and a Reference C++

preview_player
Показать описание
In this video I explain the difference between a C++ pointer and a C++ reference.

STILL NEED MORE HELP?
Connect one-on-one with a Programming Tutor. Click the link below:

:)
Рекомендации по теме
Комментарии
Автор

In short: Pointers and references can be used to refer to data in memory, without copying the data to a new variable. That is efficient. While pointers can arbitrarily be changed to point to any memory addresses and need a dereferentiation in order to read the value, references do refer to a fixed location in memory and behave like normal variables (do not need dereferentiation), when one wants to read their value. However, since no data is copied from one var to another in either case, changes made to these memory locations will be present instantly for pointers and references.

systemofapwne
Автор

Liked the idea of split screen.... helps visualising the code.... awesome concept....

rzan
Автор

I can't understate how easy and simple you made this to understand, very epic.

terrymoist
Автор

It's been four year by now but still it is precious. This video make my day.

facts-nuk
Автор

Literally the best explanation of the pointers in all of coding history.

blackblocky
Автор

I can't believe a seven-minute video summed up a concept that I did not understand for the longest time. Thank you so much for this.

bestredditstories
Автор

1 small thing you didnt mention is that pointers also have their own memory address. Just like any variable calling operator & on a pointer returns the address of the pointer, which is different to the value of the pointer, being a memory address that it is pointing to

dilute
Автор

Definitely the best video on Youtube explaining the difference between pointers and references. Also, thank you for not using all the programming jargon when explaining. Thank you!

Adam-gjdn
Автор

I know this is 3 years later but, this is the best most understandable pointer video ive ever seen ! Thank you for making it!

FirezFlightz
Автор

Great explanation. Simple and concise.
I've been taking a Lynda course C++ Essential Training by Bill Weinman but he blows through the explanation leaving me in the dust. I could see the results of what was happening in his code example, but it lacked the graphical elements that would help me understand. You did that, and it is now clear. Thanks.

alcurb
Автор

Most flawless explination I've ever seen of any programming concept. Well done and thank you.

CarsonCameronClark
Автор

At last, after years, I finally understand how pointers and references works. 🤯
Thank you very much for the explanation with visualizing the code itself! 😁👍

Proroker
Автор

7:21 - The main essence of the video. However, I would recommend everyone to watch the entire video from start till end without skipping.

KaustavMajumder
Автор

bro so easy and simple explanation, I got a friend who has 35 years in programming and he didn't make it easy to understand. Thanks again brother

arpeggio
Автор

I'm amazed by how elegantly you explained this. Thank you for being such a great instructor!

jonathanp
Автор

THIS IS THE BEST VIDEO I'VE EVER SEEN FOR EXPLAINING POINTERS AND REFERENCES I CAN'T THANK YOU ENOUGH.

ncpurge
Автор

bro, you made this so easy to understand. you're such a genius, I cant wait to come back to this channel for more things like this when I need it. keep it up

lachlanvanderdrift
Автор

This was the best explanation on both pointers and references I've found anywhere. Thank you!

griffinloiselle
Автор

Hands down the absolute best video on pointers I've even seen! I'm excited to watch your videos on LL and the rest of the different types of DS.

Squash
Автор

I suffered with pointers and references for close to a year, thanks a ton!

MoodyDood