Passing Multi-dimensional arrays to a function

Tom Haynes tdh at DRD.Com
Thu Jul 19 21:24:03 AEST 1990


volpe at underdog.crd.ge.com (Christopher R Volpe) wrote:
} >    cischa(pnlptr, "PREFIX", 0, SCREEN, prefix[curr]);
} *                                         ^^^^^^^^^^^^
} *         prefix[curr] is of type (char *) whereas the formal parameter
} *         is of type (char **). Maybe you wanted "&prefix[curr]"???
} *

I tried that, along with &prefix[curr][0], both were no go.
Error message was something like '& not allowed on struct/array'.


} >    ared2bf9EDIT, curr, buf, free, list);
} 
} > ardrvr.c(63) : warning C4047: 'arguement' : different levels
} > 	of indirection
} *
} *You haven't shown the reference to 'arguement'
} *

Arguement refers to, in this case _arguement_ 3, or buf.  Sorry if
I thought the way MSC reported errors was the only way.

} *
} *Beats me, buf is of type (char ***), and that's what the formal parameter
} *wants.
} *
} 
} Chris Volpe
} G.E. Corporate R&D
} volpecr at crd.ge.com

I agree, but since it doesn't compile, it suggests that I don't have
a good grasp if the situation.  Oh well, back to _C for the Living
Dead_, available in all your local occult stores.

Thanks, and whenever,
Tom Haynes



More information about the Comp.lang.c mailing list