char (*tp[N])[] ?
18-Aug-93 15:12:39
Sb: #36224-char (*tp[N])[] ?
Fm: Greg Comeau@Comeau Cmptg 72331,3421
To: Jeff Pratt 76057,3645
> char *mt_fieldnames[MATSTYLE_NFIELDS] = { "MAT_NAME",
> "INDEX_OF_R",
> "SURF_DEPT",
> "FIN_DEPT",
> "DAYS" };
>..
>WHERE char (*db_fieldnames[N_FB_FILES])[] = { &xx_fieldnames,
> &mt_fieldnames };
Your problem here is that xx_fieldnames and mt_fieldnames are going to
be of different dimensions. C does not have dynamic dimensioning of
this sort. Further, this presents and incomplete type of a special
sort which in general you should avoid. Further further, pointers to
arrays are oft misunderstood and most always misunderstood (not to be
avoided for the right reasons though). I suspect you may want to
collapse the [] into a *, but not being totally clear on exactly what
you want to do, that may be a misdirected comment.