From: kagel AT quasar DOT bloomberg DOT com Date: Thu, 20 Feb 1997 16:50:00 -0500 Message-Id: <9702202150.AA04758@quasar.bloomberg.com > To: fwec AT juno DOT com Cc: djgpp AT delorie DOT com In-Reply-To: <19970220.152037.7567.2.fwec@juno.com> Subject: Re: Storing pointers in a binary file Reply-To: kagel AT dg1 DOT bloomberg DOT com Errors-To: postmaster AT ns1 X-Mailer: Juno 1.15 X-Juno-Line-Breaks: 0-15 From: fwec AT juno DOT com (Mark T Logan) Date: Thu, 20 Feb 1997 15:14:52 EST Content-Type: text Content-Length: 682 In the vary near future I will be writing a funtion to write a set of data to a binary file. This set of data will have pointers in it pointing to other parts of the file. Since the starting address of the block of data once it is loaded into memory may change, I thought that the best way to store this would be to subtract the starting address of the block from each of my pointers before I store the data. Then, when I read the file from the disk, I can add the address of whatever block of memory I allocate to each of the pointers. Is this the best / easiest / most ingenius approach I can use. If you know of any other other approaches, please help me. Nope that is the best way I know. -- Art S. Kagel, kagel AT quasar DOT bloomberg DOT com A proverb is no proverb to you 'till life has illustrated it. -- John Keats