array of struct by reference ** RESOLVED!!!**
Hi,
I need help setting up the prototype, the actual function header, and the code used to modify the structure being sent to the function. I need to pass the array of this structure by reference so that any changes made change the original data sent in.
THis is what I have so far.
VB Code:
'My prototype
int getlegalmoves(struct postype pos, struct movetype *movelist[]);
'The function code
int getlegalmoves(struct postype pos, struct movetype *movelist[])
{
movelist[0].from = 1;
movelist[0].to = 2;
movelist[1].from = 3;
movelist[1].to = 4;
}