I am writing a piece of code which has a 256 element long int array (long int SmallerArray[256]) which it reads from a file (this part works) and then creates an array of the above arrays of a size which is dependent on the file it reads. So it reads through the file twice, once looking for the total number of arrays, once to take the actual data into the arrays. So eventually it's sort of like this:
long int *MassiveArray[totalNumArrays]
where each element in MassiveArray is a pointer to an SmallerArray[256]. I need MassiveArray to be global, but I don't know the 'totalNumArrays' number until after I go through a function. Is there any way to define an array without actually saying how big it is?
BTW, I can't stick a maximum value on MassiveArray like doing MassiveArray[1024] and then just using however much of it I need - it needs to be scalable according to the file's specifications.