Check out the hands on guide - ruclips.net/video/u5AH2Wn6h1o/видео.html Get notified of my upcoming C/C++ Courses - www.codebreakthrough.com/upcoming-c-cpp-courses
I thought of an analogy for when you would use pointers: Say you ask a friend to do something regarding an essay you have on an online cloud (calling a function), but to do so, you would need to send them the essay (the arguments). You can either: 1. Send them a copy of the essay via email/message. This would give them the essay as it was when you sent it, and any changes will not transfer between versions. This means that you and your friend would only be able to see each other's essays if you were to directly communicate with each other. 2. Send them a link to the spot in the cloud where the essay is in the cloud. The link itself wouldn't be the essay, but they would be able to find the essay by following the link and any changes made by either you or your friend will be visible to anyone that looks at the essay. Option 1 would be like directly inputting the variable, while option 2 would be like using a pointer. Is this right?
You should seriously be a professor or something. You literally made this so much easier for me to understand and you're the only RUclipsr I can find that teaches before coding which is why I only watch your videos lol
I don't want to say other lessons bad, it's the best of 5 which I saw about pointers in recommends, and... really understand what it is and how to use it after watching. But, why is here low number of likes, not even 500. Everyone, put likes, this lesson deserves it!
Caleb, you figure out what might be difficult to understand and you explain it very clearly. You are a great teacher, keep up the good work! Thank you very much :)
8:27 was the point of no return where i crossed into learning about pointers all thanks to you Caleb! I love your explanation videos! Thank you for making teaching and explaining these concepts!
highly recommended video if anyone didn't get the pointer concept or don't know the use of a pointer, watch this video. Really helpful for me and thank you for the excellent explanation.
awesome! in my class they are teaching us about pointers and new, delete, null, which seems like the old and harder way of doing things, but thanks for mentioning it in your video! most ppl skip it because its not used frequently but when we have to follow a curriculum from univ is hard to avoid and find info about those. thank u!
I was really confused about the meaning of the asterik when using pointers, and how it can be used in a couple different ways. This video really helped clear that up. Thanks!
This helps a lot. I am taking a college coding class and when we just started talking about references and pointers it was confusing. This teaching series is helping a lot though, thank you! Very fun to watch😊
int* x seems more readable to me than int *x - it makes it more clear that it's an "int-pointer" ie. its own type, distinct from int. I know there all kinds of arguments about this but I don't care because I'm always right.
I heard someone say you needed points to program a game, I had him explain to me what pointers are but I didn’t understand it or why I would need it, thanks for the great video
I rarely comment on videos but just wanted to say that I've watched this vid on pointers and your vid on references. You explain things very fluidly and casually, I really appreciate it.
I learnt more about pointers after learning C from the K&R textbook and Michael Daconta's C++ Pointers and Dynamic Memory Managements. Kernighan and Ritchie explain pointers very well and Daconta's book is highly recommended for furthering your knowledge.
Oh my god! I luv your explanation of pointers! My professor at school is so confusing so I had to go to youtube to find a better explanation. Your video at explaining pointers is very clear!
i had to learn this in the lecture hall equivalent of a hot-locked car, and picked up nothing. I was really scared, but this saved me. And I love CS, so learning this and thinking of how this can improve my code gives me tingles :D
I hope you are making millions off these videos because you are helping millions. If you started a goFundMe and asked all your viewers to donate a dollar we would all do it and you would be rich
Pointers are great for "hacking" other software, if it does not have an api. You can find out the memory addresses and read the data of other stuff and use it in your own software. Pretty sure it is violating some policys in a way, but sometimes it is an unfortunate necessarity. It is basicly the same as using cheat engine. Said differently, you can use a tool like cheat engine to find out memory locations and use this in your programs for whatever you need it.
At the end of the video you started firing them little neurons I got, then said “but let’s not get into the weeds we’ll just stop here” 😭 good video though, I wanna move from Java to c++ and this was one of the first videos I watched, so thanks.
Good, good, good. The book I was learning from told about assigning and dereferencing with * but never said anything about using *x , for example, by just referring to x. Now I know. Also, this video made me feel mad clever, like one of those beautiful mind guys writing nifty equations on a chalk-board that nobody else can understand.
This guy just explained pointers the best I've ever heard it explained........... and I'm still confused. lol Whoever was the architect of doing it this way in the beginning needs to be tarred and feathered.
Is it possible or allowed to define an integer pointer as int* y = &x as opposed to int *y = &x? I know c++ ignores spaces in most situations, but does asterisk placement make a difference in that statement?
if you're initializing the variable *y and setting it to the address of x (&x), why does that same *y call the value at that address and not the address itself when you use it later in the code, since you set it to the address in the beginning? that seems inconsistent to me
Nice! Thank you! I guess that is why people prefer to declare with int* y instead of int *y to avoid confusion the only thing i dont like about this video is the fact that you use blackboard it hurts me soo much haha
So what's a use case where a pointer would be necessary? If I understood correctly all the examples you are giving here could also be done with references. In fact, you used the same examples in the references video.
Check out the hands on guide - ruclips.net/video/u5AH2Wn6h1o/видео.html
Get notified of my upcoming C/C++ Courses - www.codebreakthrough.com/upcoming-c-cpp-courses
I love how casually this guy speaks. Almost like a friend sharing notes :)
I thought of an analogy for when you would use pointers:
Say you ask a friend to do something regarding an essay you have on an online cloud (calling a function), but to do so, you would need to send them the essay (the arguments). You can either:
1. Send them a copy of the essay via email/message. This would give them the essay as it was when you sent it, and any changes will not transfer between versions. This means that you and your friend would only be able to see each other's essays if you were to directly communicate with each other.
2. Send them a link to the spot in the cloud where the essay is in the cloud. The link itself wouldn't be the essay, but they would be able to find the essay by following the link and any changes made by either you or your friend will be visible to anyone that looks at the essay.
Option 1 would be like directly inputting the variable, while option 2 would be like using a pointer.
Is this right?
Nice analogy,well explained.
so... DropBox ?
That's the confusing part with reference
Pointer in C: int *p
Pointer in C++: std::unique_ptr p
Holy... My professor could never explain this so smoothly in half a semester. Thank you!
Certainly the best video on pointers, I wish more people taught concepts like this, rather than just showing a bit of code and syntax
Finally! Big help for me right now during my class. Thanks dude.
Goddamn you explained this so wonderfully in 15 mins that my professors couldn't in an entire semester lol
literally very fucking true
Yes
Almost as though a lot of CS professors aren't always sure of what they are teaching....almost lol!
@@humann5682 or just dont care
@@humann5682 wow didn't know this was common until now lmao.
You should seriously be a professor or something. You literally made this so much easier for me to understand and you're the only RUclipsr I can find that teaches before coding which is why I only watch your videos lol
I don't want to say other lessons bad, it's the best of 5 which I saw about pointers in recommends, and... really understand what it is and how to use it after watching. But, why is here low number of likes, not even 500. Everyone, put likes, this lesson deserves it!
Caleb, you figure out what might be difficult to understand and you explain it very clearly. You are a great teacher, keep up the good work! Thank you very much :)
Agreed!
8:27 was the point of no return where i crossed into learning about pointers all thanks to you Caleb! I love your explanation videos! Thank you for making teaching and explaining these concepts!
highly recommended video if anyone didn't get the pointer concept or don't know the use of a pointer, watch this video. Really helpful for me and thank you for the excellent explanation.
I've been struggling with understanding pointers in my C++ course, but your explanation made so much more sense! Thank you!
awesome! in my class they are teaching us about pointers and new, delete, null, which seems like the old and harder way of doing things, but thanks for mentioning it in your video! most ppl skip it because its not used frequently but when we have to follow a curriculum from univ is hard to avoid and find info about those. thank u!
I was really confused about the meaning of the asterik when using pointers, and how it can be used in a couple different ways. This video really helped clear that up. Thanks!
This helps a lot. I am taking a college coding class and when we just started talking about references and pointers it was confusing. This teaching series is helping a lot though, thank you! Very fun to watch😊
watched like 10 videos about pointers. That's the one that made me understand how and why use pointers
int* x seems more readable to me than int *x - it makes it more clear that it's an "int-pointer" ie. its own type, distinct from int. I know there all kinds of arguments about this but I don't care because I'm always right.
I'm with you on this one, all the arguments are blah blah blah multiple variables blah blah.. we're just right it's that simple. :)
I heard someone say you needed points to program a game, I had him explain to me what pointers are but I didn’t understand it or why I would need it, thanks for the great video
been trying to understand this since i was in university. you explained it more clear than my profs lol
I rarely comment on videos but just wanted to say that I've watched this vid on pointers and your vid on references. You explain things very fluidly and casually, I really appreciate it.
I learnt more about pointers after learning C from the K&R textbook and Michael Daconta's C++ Pointers and Dynamic Memory Managements. Kernighan and Ritchie explain pointers very well and Daconta's book is highly recommended for furthering your knowledge.
Oh my god! I luv your explanation of pointers! My professor at school is so confusing so I had to go to youtube to find a better explanation. Your video at explaining pointers is very clear!
0:17 it was at this moment that I knew, I'm subbing
Hey Caleb, thanks for make this content available,I'm feeling less dumb now.
Thanks for uploading. Pointers are terrifying for(almost) every student learning C++.
That pointer pun. *chef kiss*
So nicely explained man . Really like your casual speaking explanation.
thank you for posting. i did not understand and my professor hardly explained it.
Cheers lad, these videos are a great help for uni
thx for helping me learning pointer please continue create more tutorial video!!
You explain things really well. Subbed!
Great help in understanding pointers! Thanks Caleb.
This guy is so funny. And very well explained a very difficult and confusing subject.
i had to learn this in the lecture hall equivalent of a hot-locked car, and picked up nothing. I was really scared, but this saved me. And I love CS, so learning this and thinking of how this can improve my code gives me tingles :D
I hope you are making millions off these videos because you are helping millions. If you started a goFundMe and asked all your viewers to donate a dollar we would all do it and you would be rich
I'm so glad you make videos. You explained this in a way that was very easy to understand. Thanks!
I swear I always have fun and enjoy c++ when I watch caleb curry
Great video, really helped me get a handle on the concept while keeping it interesting. Thanks for the help and keep doing you bro!
I hate visual studio. My professor also just says “here’s your assignment good luck” so I’m on my own. This helped a lot thanks!
One of the best explanation 😮
Good job on explaining it. Thank you very much. Rock on!
Very clear and articulated. Keep it up!
i'm 22 seconds into the video and ive already clicked the like button and subscribed, only from that Pointer joke. amazing
Hallelujah for this man. Fighting the good fight
Caleb you are one of those guys >>
Pointers are great for "hacking" other software, if it does not have an api. You can find out the memory addresses and read the data of other stuff and use it in your own software. Pretty sure it is violating some policys in a way, but sometimes it is an unfortunate necessarity. It is basicly the same as using cheat engine. Said differently, you can use a tool like cheat engine to find out memory locations and use this in your programs for whatever you need it.
also, we can call "&" (address of operator) as ampersand operator.
Thanks for your comment, you actually helped me to understand my Problem ^^.
Please stay well and keep on :D.
Greetings from Switzerland!
after weeks of not understanding pointers, I am finally granted some clarity.
Where's the second part? Amazing video
God bless you my friend your videos are the best!
I dont know why, but even though C++ is harder...typing it is so much more satisfying .....atleast for me.
int x = 5
int *p = &x (adress of)
x = 5
&x = 0x5ffe94 (some adress in memory)
p = 0x5ffe94
*p = 5
@8:27 "c programming... disgusting..." I'll repeat that after you as many times as you want! 🙂 But seriously, I love the way you teach!
At the end of the video you started firing them little neurons I got, then said “but let’s not get into the weeds we’ll just stop here” 😭 good video though, I wanna move from Java to c++ and this was one of the first videos I watched, so thanks.
Finally, the video/topic I've been waiting for
Thank you!
The pointer pun 👌 LOL
Good, good, good. The book I was learning from told about assigning and dereferencing with * but never said anything about using *x , for example, by just referring to x. Now I know. Also, this video made me feel mad clever, like one of those beautiful mind guys writing nifty equations on a chalk-board that nobody else can understand.
No offense intended to some of our brethren, but some of them are impossible to understand. I love how clearly and casually Caleb speaks.
Very well explained, thanks Caleb!
Finally I feel like I understand!
great video he explain like talking to a friend
:)) To me , it's the first time I see someone writing by left hand . Awesome
Wow!...so much informative...everybody explains shit in my life about that pointer thing....now i know why c,c++ is that faster❤️
1 year after high school i'm finally kind of understanding
YOU sir are a dead set LEGEND!
4:09 As if Hexadecimal "numbers" makes sense lol... hex includes letters. I would just say hexadecimal characters...
Well in hex A-F would be numbers not characters. All kinds of confusing 😉
I suppose the term "numerals" is likely most appropriate for this context.
Bless you Caleb!
9:10 then why not just write int* y = &x and then cout
This guy just explained pointers the best I've ever heard it explained...........
and I'm still confused. lol Whoever was the architect of doing it this way in the beginning needs to be tarred and feathered.
subscribed right after the pointers joke
Just try combination of & and * until it works
The pun gave you an instant like. Thank you for the laugh and the info!! :)
"If you're new to the subject it can be a little bit complicated."
I learned C++ in university 4 years ago and I still google when to use & and *
thanks caleb love you
Thanks for the pointers
9:10 "because I told you to."
Thank you for this 🙌
Is it possible or allowed to define an integer pointer as int* y = &x as opposed to int *y = &x? I know c++ ignores spaces in most situations, but does asterisk placement make a difference in that statement?
No, it does not make a difference. Defining a pointer as:
int* y = &x;
int *y = &x; or
int * y = &x;
are basically the same thing.
Int* just makes more sense
Just *had* to subscribe after that pointers pun.
Hey Caleb, hope you're doing well my dude
You are great teacher!
pointer are way easier that i thought, nothing compare to recursion
if you're initializing the variable *y and setting it to the address of x (&x), why does that same *y call the value at that address and not the address itself when you use it later in the code, since you set it to the address in the beginning? that seems inconsistent to me
So what's the difference between references and pointers?
Caleb wazzzzup brothaaaaaaa!
It's at 0:17 that you get my like
8:28
super helpful! Thank You!
Nice! Thank you! I guess that is why people prefer to declare with int* y instead of int *y to avoid confusion
the only thing i dont like about this video is the fact that you use blackboard it hurts me soo much haha
Caleb, is it Indian Curry or English Curry?
Thanks again! I got the point
😁
I like this explanation
What program do I need to study this?
@Cat Person With Anxiety I mean in order for me to run the codes that I made what software do I need ?
@Cat Person With Anxiety do I need to download that? How?
Thanks!
Why the heck is it always the youtube videos that make sense and not the professors.
thank you buddy!
So what's a use case where a pointer would be necessary? If I understood correctly all the examples you are giving here could also be done with references. In fact, you used the same examples in the references video.