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)
float geno[MAXLOCI], *covar, score;
and declared as an array
and I call the function PermP
double PermP(INPUTtype inputs, float tval , DATAtype *orig, DATAtype *permed,int pteston, NNET2type Net, float *totsqerr, int *index, PATTERNtype InPatterns,PATTERNtype OutPattern);
with the call
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++
c:\snpnet\netcall.c(746) : warning C4024: 'PermP' : different types for formal and actual parameter 3
c:\snpnet\netcall.c(746) : warning C4047: 'function' : 'struct DATAtype *' differs in levels of indirection from 'struct DATAtype (*)'
the 1000 refers to MAX_PATTERNS.
by the way the program seems to work fine !!! but I'm keen to sort this error before I change it to use malloc.
sorry its a long tedious query
many many thanks in advance for any advice (and thanks for your help on a couple of previous occasions too)