Help with binary files

I want to know how can i do (in c++) to re-write in an existing binary file, without erasing its content ?