FILE *fpl; FILE *fp2; FILE *fp3 ; /*Open the files to be written to or read*/ fpl = fopen("map.txt", "w") ; fp2 = fopen("mapdata.txt", "r"); fp3 = fopen("segments.txt", "w"); fscanf(fp2, "%d", &num_obstacles); for(i=0; i