[OCLUG-devel] sizeof an array of pointers

Doug Jolley ddjolley at gmail.com
Sun Jun 19 18:33:10 PDT 2005


Hi,

I'm using a library routine that defines array as 'char **array'.  I
thought I  would be able to ascertain the size of the array (in bytes)
by using 'sizeof(array)'.  What I'm getting is '4' which is not the
size of the array in bytes.  It's not the number of elements in the
array either.  I think it MIGHT be the number of bytes in the pointer.
 So, my question is:  What do I need to do to get the size of the
array in bytes?  My ultimate objective is to get the number of
elements in the array; but, I think that should be fairly easy after I
get the array size in bytes.

Thanks for any input.

      ... doug
-- 
(Not digitally signed.)


More information about the OCLUG-devel mailing list