[gameprogrammer] Re: Books for mastering C++ pointers
- From: Chris Eineke <gameprogrammer@xxxxxxxxxxxxxxx>
- To: gameprogrammer@xxxxxxxxxxxxx
- Date: Mon, 28 Nov 2011 22:21:45 -0500
On 11-11-28 12:22 PM, Dipankar Das wrote:
Could you please suggest me some good books to master pointers?
Pointers are explicitly-typed memory addresses. A variable, function parameter,
method parameter, return type, structure field, or class member that you declare
as a pointer contains the memory address of a pointee (the object that the
memory address refers to).
You can write memory addresses to pointer variables and read memory addresses
from pointer variables. You can dereference pointer variables to get at the
pointee and you can take address of an object to get a pointer, including
pointer variables themselves (a pointer to a pointer, or double-pointer).
You may decrement pointer variables and you may increment pointer variables,
which decrements and increments the stored memory address by the pointee's size.
C's Arrays and pointers are similar, but cannot be used interchangeably.
C++ has rules for up-casting and down-casting pointers in an object hierarchy.
This should get you started.
- chris
---------------------
To unsubscribe go to http://gameprogrammer.com/mailinglist.html
Other related posts: