Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!hellgate.utah.edu!csn!ncar!zaphod.mps.ohio-state.edu!julius.cs.uiuc.edu!roundup.crhc.uiuc.edu!ux1.cso.uiuc.edu!osiris.cso.uiuc.edu!gordon From: gordon@osiris.cso.uiuc.edu (John Gordon) Newsgroups: comp.lang.c Subject: Re: Writing linked lists to a file Message-ID: <1991Jan22.203745.18261@ux1.cso.uiuc.edu> Date: 22 Jan 91 20:37:45 GMT References: <1991Jan19.070125.17643@zorch.SF-Bay.ORG> Sender: news@ux1.cso.uiuc.edu (News) Organization: University of Illinois at Urbana Lines: 16 If you don't mind the data file being in binary format, you might try something like this: for(node = head; node; node++) fwrite(node, sizeof(node), 1, fileptr); However, you will probably have a problem writing the pointers to a file, because when you load the nodes back in from disk, they will probably not be in the same address as before. --- John Gordon Internet: gordon@osiris.cso.uiuc.edu #include gordon@cerl.cecer.army.mil #include