ho sostituito con fwrite che mi hai dato tu....però
mi dà errore alla linea 9