The contents of the file are:
the code is:Code:dim 400 epsilon 0.001 ....
It doesn't seem to be working for the float number but works for the integer. What's wrong?Code:// read the dimension of the table fscanf(fp, "dim %d", &dimension); fprintf(stderr, "the dimension is %d\n", dimension); //printf("the dimension is %d\n", dimension); // read the fault tolerance (epsilon) fscanf(fp, "epsilon %f", &eps); fprintf(stderr, "epsilon is %f\n", eps);