I'm reading a file with the following lines:
ADD 50
ADD 30
ADD 10
ADD 12
And I wanted to read only integer values for a vector.
I'm using this code:
while(EOF)
{
aux=(char*)malloc(1000*sizeof(char));
if(aux==NULL){
printf("ERROR, vector\n");
exit(1);
}
aux[i]=fgets(aux,tam);
i++;
}
However this is not what I want because I keep ADD too.