C pointers

Joe Crowe jcrowe at shaffer.UUCP
Fri Feb 10 06:28:05 AEST 1989


Consider this a niave question.  I have a structure which contains among
other things a pointer to an array of structures declared as follows:

typedef struct XYZ
{
     .
     .
     .
     struct diag_cmd    (*p_cmd_blk)[];
     .
     .
} t_xyz;

     I am allocating storage for the above structures dynamically and
setting the pointer p_cmd_blk manually.  All of this works.  But when
I try various methods of accessing a structure member one of the array
of structures I am getting compiler errors.  I have tried most combinations
but with no luck.  Any ideas??

   Thanks in advance.

Joseph Crowe



More information about the Comp.lang.c mailing list