Forse il disco fisso sta andando... prova a fare un bel chkdsk /f.
Amaro C++, il gusto pieno dell'undefined behavior.
Regole del Forum