i am almost done, thanks a lot for the help friends.
i tried
Code:
//while (!feof(in)) {
fgets(line, sizeof(line),in);
sscanf(line, "%f,%f,%f", &x, &y, &z);
fprintf(out, "%f,%f,%f\n", x*2, y*2, z*2);
}
and this works except for the fact that the last line of "in" is computed and printed to out twice.
if i use
Code:
while (fgets(line, sizeof(line), in) != NULL) {
fgets(line, sizeof(line),in);
sscanf(line, "%f,%f,%f", &x, &y, &z);
fprintf(out, "%f,%f,%f\n", x*2, y*2, z*2);
}
the FIRST line is ignored