double pointer

anilk501's Avatar
Go4Expert Member
what is use of double paointers and give me some example in real wolrd application
DaWei's Avatar, Join Date: Dec 2006
Team Leader
I presume you mean a pointer to a pointer, and not a pointer to a double type. Here's a non-programming example: You ask me for contact information for a plumber. I point you to the phone book. The phone book points you to the plumber. A programming example would be a 2D pseudo-array gotten from the heap one row at a time. To access a given element, one would provide a pointer to the row pointer, which would then be dereferenced to get the element.
wrecker's Avatar, Join Date: Mar 2007
Go4Expert Member
Quote:
Originally Posted by DaWei
I presume you mean a pointer to a pointer, and not a pointer to a double type. Here's a non-programming example: You ask me for contact information for a plumber. I point you to the phone book. The phone book points you to the plumber. A programming example would be a 2D pseudo-array gotten from the heap one row at a time. To access a given element, one would provide a pointer to the row pointer, which would then be dereferenced to get the element.
was a very nice and self explanatory example DaWei. Thanks