#include <stdio.h>
#include <math.h>
FILE *input, *output;
main()
{
int Max, Min, x[1000000],i=1,n=0,j=0;
input = fopen ("Nube_de_Caminantes.txt","r");
n=getw(input);
while (n !=EOF)
{
fscanf(input, "%i",x[i]);
i++;
n = getw(input);
}
fclose(input);
}
There is some stuff I need to do with the array once I have it, but I can't get this to work. It compiles fine but it crashes if I try to run it. I'm quite the newbie when it comes to C, any help is welcome. Thank you.