Guru's,
Anybody got a simple example of accessing custom elements from an expandable array?
For example, this correctly prints out what it should:
typedef struct user_appdata {
int TargetCompID;
int TargetDimID;
int ThisCompID;
float NewDimValue;
} UserAppdata;
ProArray DimChanges;
while ( !feof(fIn) ) {
appdata = (UserAppdata*)calloc(1,sizeof(UserAppdata));
fscanf(fIn,"%d,%d,%f\n",&appdata->TargetCompID,&appdata->TargetDimID,&appdata->NewDimValue);
ProArrayObjectAdd((ProArray*)&DimChanges,PRO_VALUE_UNUSED,1,&appdata);
printf("%d,%d,%f\n",appdata->TargetCompID,appdata->TargetDimID,appdata->NewDimValue);
}
But this doesn't:
i = 0;
while ( !feof(fIn) ) {
appdata = (UserAppdata*)calloc(1,sizeof(UserAppdata));
fscanf(fIn,"%d,%d,%f\n",&appdata->TargetCompID,&appdata->TargetDimID,&appdata->NewDimValue);
ProArrayObjectAdd((ProArray*)&DimChanges,PRO_VALUE_UNUSED,1,&appdata);
printf("%d,%d,%f\n",DimChanges[i].TargetCompID,DimChanges[i].TargetDimID,DimChanges[i].NewDimValue);
i++;
}
Thanks,
Greg