[DGD]Sizeof arrays...

Michael J. Bacon mj.bacon at gte.net
Wed Jun 20 15:22:03 CEST 2001


>----Original Message-----
>From: dgd-admin at list.imaginary.com
>[mailto:dgd-admin at list.imaginary.com]On Behalf Of Jason Cone
>Sent: Tuesday, June 19, 2001 3:44 PM
>To: 'dgd at list.imaginary.com'
>Subject: RE: [DGD]Sizeof arrays...

> For maps, however, the size can be determined via (*):
>
>    unsigned short nSize;
>
>    /* Optimized division by 2 (using integer division, of course) */
>    nSize = (array*)->size >> 1;
>
>    /* This is the part that you are missing */
>    if ( (array*)->hashed != NULL )
>    {
>        nSize += (array*)->hashed->size;
>    }


	The code:

	size = map->size >> 1;
	if (map->hashed != NULL)
		size += map->hashed->size;

	produces the following error...

.\extensions.c(788) : error C2037: left of 'size' specifies undefined
struct/union '_maphash_'


	Line 788 is "size += map->hashed->size" - Do I need to include something to
make this work?


Thanks;
Michael.


List config page:  http://list.imaginary.com/mailman/listinfo/dgd



More information about the DGD mailing list