Can I declare an array variable as "int a", as in an array with no specified amount of elements to hold initially (to be determined later with a index variable)? I am writing a program that relies on a file whose contents are read into the array, but the file's contents can vary, so I'm curious if I can do this, and then determine through a file read how many elements are in the file, then take that number and use it as the amount of the array's index.
Or maybe I got it all in reverse, and that maybe I have to do the file read FIRST, then when declaring the array to hold its contents, I use the counted contents index in the array declaration?
I.E: int a[index];
Thanks in advance