I am trying to write a file and append data to it. Here is a snippet of my code. thresh is an unsigned short.
FILE *fp_th; ...