delorie.com/archives/browse.cgi | search |
From: | "Campbell, Rolf [SKY:1U32:EXCH]" <moscoop AT americasm01 DOT nt DOT com> |
Newsgroups: | comp.os.msdos.djgpp |
Subject: | Re: Errors using Bit Fields in DJGPP |
Date: | Thu, 02 Mar 2000 09:24:10 -0500 |
Organization: | Nortel Networks |
Lines: | 21 |
Message-ID: | <38BE798A.E4C77E32@americasm01.nt.com> |
References: | <sbrjrfb8ee6135 AT corp DOT supernews DOT com> |
NNTP-Posting-Host: | wmerh0tk.ca.nortel.com |
Mime-Version: | 1.0 |
X-Mailer: | Mozilla 4.72 [en] (X11; I; HP-UX B.10.20 9000/785) |
X-Accept-Language: | en |
To: | djgpp AT delorie DOT com |
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp |
Reply-To: | djgpp AT delorie DOT com |
JoeGuy wrote: > Are bit fields possible in DJGPP? I tried the following code and got erros: > > unsigned getInput():4 > { > unsigned up : 1 = key[KEY_UP]; > unsigned left : 1 = key[KEY_LEFT]; > unsigned right : 1 = key[KEY_RIGHT]; > unsigned down : 1 = key[KEY_DOWN]; > > Notice I've tried to return a bit field also, but all get errors: Bit fields are only allowed inside a struct/class. -- (\/) Rolf Campbell (\/)
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |