Комментарии:
Great explanations. ❤
Ответитьwe need 7 minute just to explain pointer and they still say c++ is easy to learn lol
ОтветитьSuddenly! I feel that the pointer arithmetic is so easy😮
Thanks❤
thank for your explaination
Ответитьah so references to pointers as hard symbolic links are to soft symbolic links?
ОтветитьOMG, how easy to understand. thank you
Ответитьway way way way way too wordy. just: "the address" "the thing at that address". that's it!
ОтветитьReference is... pointless.
ОтветитьI suffered with pointers and references for close to a year, thanks a ton!
ОтветитьAnyone from India?
ОтветитьThank you
Ответитьthanks, you are an amazing good explanation :) if you explain first how to assign the reference and the case that we can't do it with the reference and we can do it with a pointer it will be helpful
ОтветитьHis Tutorials are fantastic.
I don't know why he didn't continue uploading tutorials
by far the clearest video I've found.
ОтветитьYou explained it so well i tried to understand the difference the whole day. Thank you🎉
Ответитьref -> static mem.alloc (stack) vs ptr -> dynamic mem alloc (heap) && ref = substitute name (label) for address && ptr = variable holding address
Ответитьthankyou
ОтветитьHere's the difference:
int v; //variable for primitive
int* pvti; //pointer variable to int
pvti=&v; //v has garbage, =address of v
cout<<*pvti; //dereferences primiti garbage
string rv; //reference variable for object
string* pvts; //pointer variable to string
pvts=&rv; //rv has garbage, =address of obj
cout<<*pvts; //dereferences objec garbage
So a pointer is like a symbolic link and a reference is like a hard link?
Ответитьte amo loco, viva el conocimiento libre y a disposicion de todxs!!!!
Ответить👍👍👍
Ответитьnice!
ОтветитьSo why do we need the references while we can use pointers?
ОтветитьOke, but why? Why would a variable ever need 2 names?
Ответитьlove the visualization, conciseness, and easy to follow style of this video , thank you
ОтветитьGreat
ОтветитьI love you I love you I love you I love you I love you I love you I love you I love you I love you I love you I love you I love you I love you I love you I love you I love you I love you I love you I love you I love you I love you I love you I love you I love you I love you I love you I love you I love you I love you I love you I love you I love you I love you I love you I love you I love you I love you I love you I love you I love you I love you I love you I love you I love you I love you I love you I love you I love you I love you I love you I love you I love you I love you I love you I love you I love you I love you I love you I love you I love you I love you I love you I love you I love you I love you I love you I love you I love you I love you I love you I love you I love you I love you I love you I love you I love you I love you I love you I love you I love you . I can't say it enogh but I love you that you made it so simple!
Ответитьmy problem isnt understading how it works, its more like... Why? why not just use the original variable?
ОтветитьPaul your a mad dog thanks for this helped heaps
Ответитьvraiment très intéressant, mon connard professeur nous a rien expliqué
ОтветитьLiterally the best explanation of the pointers in all of coding history.
ОтветитьWe haven't heard what's the purpose of references. It can't be mere aliasing, can it?
Ответитьthanks a lot, I really appreciate this explanation, it is done very well
ОтветитьThank you for this tutorial! It was clear, concise, and easy to follow.
Ответитьyou oversimplified the difference between pointer and reference. its not created just because you would be able to change one and not to change the other one. pointing means you point to the thing in memory with regards of the type of the pointer. when it has a type it means it has a memory itself. whereas the reference means the absolute thing in that location . that makes difference when classes comes in the party.
Also the & is a function that return a memory address. And the * is a function that returns the value of a thing in a memory location.
I have a confusion if reference is just another name for a variable and gives us the same value than why we just simply do
Int a,b;
int a=3;
Now just
int b=a;
Then b also gives us the same value
Why we need to make reference variable?
Suggesting in an intro video that you should just assume that your pointer is initialized to 0 is just idiocy. You are starting off with a really bad habit. Why not just at least initialize to null, and say you did it, rather than lying? You aren't claiming to be using a global variable because you said it might be random.. Put it in main, say it's random, and initialize it.
Ответить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
ОтветитьSo the reference variable is literally like an alias for the actual variable since it doesn't even have its own address.
ОтветитьFinally, someone just explains what an "alias" is.
Ответитьshort, simple, and helpful. Thanks!
ОтветитьLove how this was concise and diagrammatically explained.
ОтветитьA pointer is an address in memory and stores at that address the address of an variable. A reference is just an address to the variable.
ОтветитьVery nice explaination😍
Ответитьhaving c++ classes for 4 months, and i never had such a simple explanation between reference and pointers <3
Ответитьthank you so much that really helped !
ОтветитьIt's working thanks my friend
ОтветитьVery good explanation! easy to understand
Ответить