I know it's old but, why can't the compiler jsut dereference the pointer first? Do you know if there is a reson for that? That way they wouldn't need a completely new operator to exist
Sometimes you want to change the address of the pointer and not the value You have an address to a John's house. Set to Mary A postman subroutine has a pointers to "delivery for" it is set at adress: John's house Person: Marry So it means you will go to John's house and deliver the package to Mary who lives there If you always dereference that means you can only deliver to the people in John's house (Mary and John). You cannot deliver to anyone in Clements' house ie you can only change the value, you cannot change the address
Thank you for this video... although I had problems in my code. It says 'cannot convert int* to Point'. I don't have any problems using the arrow operator and such, only this (*p3), p3-> thing after dynamically allocating using malloc().
You're welcome! :-) And I'm not sure why that would be without seeing the code, can you maybe post your code in a comment here so I can look at it? I've posted the code in this video here: github.com/portfoliocourses/c-example-code/blob/main/arrow_operator.c.
@@PortfolioCourses hello, I used another IDE and the code works. My code is just the same as yours. Maybe this error has something to do with my settings...
@@Quasarsoft ty for that but i have already solved the prob months ago. Still there are times i get used to using the devc++ compiler and forgot to change it to .c 😅
Do you or does anyone else know if I should use the dot operator or arrow operator if I am dealing with a structure array? I did something like this (*pointerName)[index ].elementName
Keep in mind, when using malloc on something, use free to free the allocated memory when you no longer need it.
Your teaching style delivers maximum knowledge in minimum time .
thank you showing both ways to point to something!
You're very welcome! :-)
Thank you so much. Well presented and to the point 👍
You’re very welcome, I’m glad you enjoyed it! :-)
Thanks your explaining and speaking so clear I can understand easily
You're welcome Abdulsamet! :-)
So well explained! Thank you
Nice explanation
I’m glad you enjoyed the explanation! :-)
Thanks for supplying the code! That's awesome
You're welcome Lex! :-D
thanks man. I finally get it 😅
Really nice explanation, thanks!
You’re welcome, I’m glad you enjoyed the explanation! :-)
Thanks man You really made my day
Thanks for these videos i hope i can pass my exams.
You're welcome Aaron, and good luck on your exams! :-)
Very well explained. Thanks
You’re welcome Ulas, I’m glad you enjoyed the explanation! :-)
I know it's old but, why can't the compiler jsut dereference the pointer first? Do you know if there is a reson for that? That way they wouldn't need a completely new operator to exist
It would do it all the time, even when you don’t want it to?
Sometimes you want to change the address of the pointer and not the value
You have an address to a John's house. Set to Mary
A postman subroutine has a pointers to "delivery for" it is set at adress: John's house
Person: Marry
So it means you will go to John's house and deliver the package to Mary who lives there
If you always dereference that means you can only deliver to the people in John's house (Mary and John). You cannot deliver to anyone in Clements' house
ie you can only change the value, you cannot change the address
if im using an arrow how do i scan into those varibale?
Magic, you need to call Harry Potter. I'm actually wondering the same thing.
Thank you for this video... although I had problems in my code. It says 'cannot convert int* to Point'. I don't have any problems using the arrow operator and such, only this (*p3), p3-> thing after dynamically allocating using malloc().
You're welcome! :-) And I'm not sure why that would be without seeing the code, can you maybe post your code in a comment here so I can look at it? I've posted the code in this video here: github.com/portfoliocourses/c-example-code/blob/main/arrow_operator.c.
@@PortfolioCourses hello, I used another IDE and the code works. My code is just the same as yours. Maybe this error has something to do with my settings...
@@marbles5590 I suppose you are using c++ compiler . You need to change your main.cpp to main.c
@@Quasarsoft ty for that but i have already solved the prob months ago. Still there are times i get used to using the devc++ compiler and forgot to change it to .c 😅
hello from Brasil.
thanks!
You're welcome! :-) And hello from Canada!
Useful!
Love this!
clear in very helpful
Awesome, I’m glad to hear that! :-)
Do you or does anyone else know if I should use the dot operator or arrow operator if I am dealing with a structure array? I did something like this (*pointerName)[index ].elementName
it's syntax sugar to help keep track of what is a pointer. Arrays are automatically de-referenced so it would be standard to use dot here.
which IDE are you using?
when we use char data types for this, it doesnt work.
Thank you sir ...
You're welcome! :-)
what text editor u r using
X code on mac
Thank you!
You’re welcome Ion! :-)
what text editor r u using
In this video I am using Xcode on a Mac. 🙂
You are godlike.
Aww haha thank you very much for the support. :-)
👍
Thanks! :-)