Pointers to Pointers in C/C++

preview_player
Показать описание
See complete series on pointers in C / C++ here:

In this lesson, we have described how we can create pointers to pointers and use them in our code.

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

7 years and till I couldn't find a better tutorial than this.

meenakshisundaram
Автор

Few days back i learned pointers in my c++ institute and i was confused about the concept, and now after watching this tutorial i can say i know what pointers are and how they are stored in a memory.
Thank you very much!!!!

ayaan
Автор

4 years after I completed my Graduate and watching it to revise my pointers concept and believe me, still can't find any better video than this.

rupeshaggrawal
Автор

although i m in a reputed institution of engineering but your channel is above all educators ...
with no buttering and humbly praising that u are awesome educator and u have god gifted talent of teaching which is not possessed by many teachers ..
may u be blessed ..

Nnowledge
Автор

Thanks Samir, for noticing. Yes, it should be 205. . I have added a note as correction.

mycodeschool
Автор

your diagrams are the only cause that pointer to pointer entered my brain properly :)

MohitK
Автор

Sometimes, pointer variables may be holding an important information. If you know of linked list, there is a head pointer that stores the address of the first node. Now, lets say we declared this head as a local variable in main method and want to modify it in some other function. So, we can pass head by reference. Called function will receive a pointer to pointer. Let's say method reverses list. Signature will be void Reverse(Node** head);. *head will give access to "head" in main method.

mycodeschool
Автор

This is an excellent video. Ironically it explains the concept 100 times better than my university profs

ThePaullam
Автор

Thanks Vaibhav ! Valid suggestion. I thought of doing so initially, but video was getting long and i thought of doing it in another lesson. Stay tuned and keep interacting. :)

mycodeschool
Автор

Hi Magdy,
Structures were used in 'C' to create user defined complex data types with multiple fields. We cannot declare functions within structures in C. As we moved to C++, struct was kept as a keyword and can be used in an object oriented manner just like class. So struct in 'C' are different from struct in 'C++'. in C++, struct are just like classes. They can have functions inside them as well as other object oriented features like inheritance. contd to part 2...

mycodeschool
Автор

Pointers are quite confusing to me but you are making them seem easy. Great teacher.

atanatirosgiliat
Автор

dear mr mycodeschool-
another well done tutorial. thanks for all of these!!!
- C student

robl
Автор

contd... Here head in Reverse function is local and of type Node**, while head is main is local and of type Node*. Now, when main calls Reverse, it will call like Reverse(&head); So, Reverse will receive the address of head in a pointer to pointer and access head in main as *head. So, if it writes *head = something, it modifies the head in main method. Let me know if you still do not get it.

mycodeschool
Автор

Excellent video, clear and full explanation of the details. Pointers are one of the most important topics in C++ so it's a hassle when they don't explain properly in class. Thank you!

marinalance
Автор

Got an exam tomorrow, been binge watching the playlist. So far so good.

oddeven
Автор

This is series has been really good so far. Pointers have been kicking my ass and I hope my confusion would be gone or greatly reduced by the time I'm done with this series

thatmehdude
Автор

At 5:40, shouldn't r have the value 205 instead of 215 at memory address 230? My reasoning is that since int*** r = &q; then r will have the value as the memory address of q which is 205.

rohan
Автор

My professor taught me about pointers but I couldn’t understand his topic at all. I watched many of the videos but nothing helped me . Fortunately, I found your video and it clears all my doubts and I understand the pointers. Thanks very much 😊

HarpreetKaur-wtkl
Автор

You are wrong in part where you mentioned the content of 'r'
r should hold the address of 'q' which is 205.

The diagram should be changed.

DharmaTruthDuty
Автор

Thank you very much for the clarity of your explanations May God bless you.Please keep on helping people like us with clear explanations like this..

ishaqaminu