this compiles without errors or warnings on Dev-C++
int main()
{
char line[255];
float array[255] = {0};
int i = 0;
FILE* fp = fopen("myfile","r");
while( fgets(line, sizeof(line), fp) != NULL)
{
char *ptr = strtok(line," ");
while( ptr != NULL)
{
array[i] = atof(ptr);
i++;
ptr = strtok(NULL, " ");
}
}
}