[OCLUG-devel] sizeof an array of pointers

Dan Stromberg strombrg at dcs.nac.uci.edu
Mon Jun 20 12:13:48 PDT 2005


On Mon, 2005-06-20 at 12:08 -0700, Christopher Smith wrote:
> Dan Stromberg wrote:
> > On Sun, 2005-06-19 at 19:27 -0700, Christopher Smith wrote:
> >>You are right that it's returning the size of a pointer to char*.
> > 
> > Would it not be the size of a single pointer to char **?
> 
> Nah. It's effectively doing sizeof(char**), which gives you "the size of
> a pointer to char*". The size of a pointer to char** would be doing
> sizeof(char***). As you noted, on nearly any system these will be the
> same size, but there is a semantic difference.
> 
> --Chris

Ah, I now agree.  Thanks!

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://localhost.localdomain/pipermail/oclug-devel/attachments/20050620/5041db2a/attachment.bin 


More information about the OCLUG-devel mailing list