I wanted to change a variable size record into a fixed length record. I am using fread and fwrite, but have come unstuck. What I am getting is the original record with the structure tagged on the end as spaces, the same number as the record, rather that the individual fields padded.
I would post the code, but its a bit large.
int fread and size_t fwrite are both returning 1, which shows no error.
Is this the right way to go about changing a delimited file into a fixed length ?