0

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, " ");
      }
}
}
0

No yet i get the warning from DEV about the cast (As i said in previous post)

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.