I have:
pointfile = fopen("points.bin", "wb");
void savepoints(point points[], int n, FILE f){
fwrite(&points, sizeof(point), n, &f);
return;
}
fclose(pointfile);
where typedef struct {float x; float y;} point;
and called by savepoints(buffer, npoints, *pointfile);
But nothing is written to the file. Can anyone spot my mistake? I can't see how to go about this, and other's I find searching either don't relate, or have merely got me this far.
FILE *tosavepoints...*pointfileand...&f?fwrite(pointsinstead offwrite(&points?&f != pointfile