Thanks for your reply.
Originally Posted by quzah
I have used rewind() function before,but it failed still.The b.bin is appended to the tail of a.bin.
according to your tip,I open a.bin using "r+b",and it works this time.
if((fb=fopen("b.bin","rb")) == NULL )
if((fa=fopen("a.bin","ab"))== NULL )
unsigned char buff;
So thank u again.But i am still confused why the rewind function dose not work.