-
Pointer Question
This will probably be an easy one for most of you, but for the life of me I can't remember.
Say we have two pointers (lptr, tptr) and they both point to the same item (lets say the root of a binary tree).
Now since they are both pointing at the root that means that the addresses of both lptr and tptr and equal (i.e. &lptr == &tptr) right?
-
No!!!!
Assume that the root's address is 0x0020ABCD. Then the value of
lptr and tptr will be 0X0020ABCD. However lptr may for example reside in memory location 0x00ABFFFF whereas tptr may reside in 0x00FFCCCC. The addresses in two pointers may be equal. The addresses of two pointers can not.
-
Got it,
In my mind I was thinking addressess but using the dereferencing symbol (*) in my 'mental' logic, so I was thingking yes.
Thanx!
-
where did you get that name..... are you a valheru?
-
Only in my dreams.
But Feist had a hand in selecting the moniker
-
have you read all of the series?
feist is my favourite author without a doubt!
-
Read'em all. Except for the very last one, the new one. Krondor: Tear of the Gods.
As far as the new series, Return to Krondor (or whatever it is), I'm not too happy with it. First book was good, story was lost on the second book, and there were even misspellings in it ('put' showing up instead of 'Pug': "...Put said..."). Want the final installment just to read them all.
From what I've heard, not too many people are too happy with the new series, they think he wrote it to go along with the new game (that comes free with the new book).