Date: Tue, 1 Jun 1999 09:43:16 +0300 (IDT) From: Eli Zaretskii X-Sender: eliz AT is To: Nate Eldredge cc: djgpp AT delorie DOT com Subject: Re: typedef'ing a 24-bit integer In-Reply-To: <375330BD.BEEE777@cartsys.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Reply-To: djgpp AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk On Mon, 31 May 1999, Nate Eldredge wrote: > Miguel Guerreiro wrote: > > Perhaps I didn't make myself clear, I only want it to take three bytes > > when I save it to disk ( maybe packed ) not while I'm working with it... > > So just use `int', and write it like: > > putc(x); > putc(x<<8); > putc(x<<16); ...and don't forget to switch stdout to binary mode (e.g., with `setmode') before you do the above.