Computer Chess Club Archives




Subject: Re: Book design

Author: David Rasmussen

Date: 14:39:58 11/28/02

Go up one level in this thread

On November 28, 2002 at 16:54:16, Sune Fischer wrote:

>On November 28, 2002 at 13:21:14, Matthias Gemuh wrote:
>>My book record is
>>typedef struct {
>>    unsigned long HashKey, HashLock;
>>    CHESSMOVE Move;
>>    int Result, lrnResult;
>>    unsigned int Count;
>Do you know of a clever way to print such a struct binary to a file, and read it
>back in?

The only portable way is to write/read one byte at a time, since endianess
varies across different platforms. That is pretty easy though.


This page took 0 seconds to execute

Last modified: Thu, 15 Apr 21 08:11:13 -0700

Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.