Leon Breedt wrote:

> > Shouldn't the declaration just be
> >     pwlistentry *PasswordList = NULL;
> 
> quite possibly, i got that declaration from the program 'cdecl', by giving
> it the input:
> 
> declare PasswordList as pointer to array 20 of struct pwlistentry
> 
> and then it gave me the declaration i used.

No surprise there. However, you probably should have given it

        declare PasswordList as pointer to struct pwlistentry

The difference?

        pwlistentry (*PasswordList)[20] = NULL

declares PasswordList as pointing to an array of 20 pwlistentry
structures, so you would need do dereference it twice, e.g. with

        (*PasswordList)[i]
or
        PasswordList[0][i]

And
        sizeof(*PasswordList)

would be equal to

        20 * sizeof(pwlistentry)

so
        PasswordList++

would increment PasswordList by

        20 * sizeof(pwlistentry)

bytes.

-- 
Glynn Clements <[EMAIL PROTECTED]>

Reply via email to