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
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
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 😅