From: "Campbell, Rolf [SKY:1U32:EXCH]" 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: NNTP-Posting-Host: wmerh0tk.ca.nortel.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit 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 (\/)