I'm writing a function to read in a number of words from a binary file. the size of each word and the number of words to be read are defined by the function input parameters. I cannot allocate the size of the array to contain all th words properly.
Do I need a pointer of some sort?Code:void ReadSW01HEAD(FILE *ptr, long n /*Number of Parameters*/, long Size /*Section Size*/) { char Param[n]; int FieldLength = Size/n; printf("Parameters Present\n\n"); fread(&Param,sizeof(char),FieldLength,ptr); printf("%s ",Param); }