dear smart folks, sorry if this is a trivial question.
I am trying (in MSVC++ but its a C not C++ program)
to pass a 1D array of structures to a function by "reference" (not value, I want the function to be able to change values).

the structure is typedeffed (outside main) using defined constants (but ultimately I will want to malloc its size which may cause problems again)
[code]
typedef struct
{
int cc;
float geno[MAXLOCI], *covar, score;
} DATAtype;
[\code]
and declared as an array
[code]
DATAtype orig[MAX_PATTERNS]
[\code]
and I call the function PermP
[code]
double PermP(INPUTtype inputs, float tval , DATAtype *orig, DATAtype *permed,int pteston, NNET2type Net, float *totsqerr, int *index, PATTERNtype InPatterns,PATTERNtype OutPattern);
[\code]
with the call
[code]
ppval=PermP(inputs,tval,&orig, ....
[\code]
now I thought to pass by ref passing an address and receiving as a pointer to DATAtyoe was correct.
this link http://www.iota-six.co.uk/c/33_struc_s.htm seems to say so.
but there seems to be some confusion over passing a structure or an array of structures that I can't resolve as I get a warning error in MSVC++