X-Authentication-Warning: delorie.com: mailnull set sender to djgpp-bounces using -f From: "FYS" Newsgroups: comp.os.msdos.djgpp References: <4PpD8.150757$v7 DOT 14044373 AT bin6 DOT nnrp DOT aus1 DOT giganews DOT com> Subject: Re: casting a pointer of a pointer Lines: 45 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 Message-ID: NNTP-Posting-Date: Sun, 12 May 2002 15:34:24 CDT Organization: Giganews.Com - Premium News Outsourcing X-Trace: sv3-u2jk13PqsIawzXybhsqE7F304Ca5w5dlGaqlGgqztx+eA5+EW5KL1Qb9DCPsnnKXGJUo0pFBtMboA1w!w/w1I4ZeP6nnLnCEBxaxRz4Z3SRrZfx8C19ZcSSQxm7ZdIdahAlurLqbRfmBjgOVqCWqGIlUAmC2!MxzYsvSdYA51jOORAQ== X-Complaints-To: abuse AT GigaNews DOT Com X-DMCA-Notifications: http://www.giganews.com/info/dmca.html X-Abuse-Info: Please be sure to forward a copy of ALL headers X-Abuse-Info: Otherwise we will be unable to process your complaint properly Date: Sun, 12 May 2002 20:34:24 GMT To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com "JANE AMBUHL" wrote in message news:abls3b$1cmu$1 AT trip DOT net... > Surely > repcnt = *(unsigned short *)li_s; /* possible alignment problem for > portable code */ > or > repcnt = (unsigned short)*li_s; > is what you meant. > > Your problem is not djgpp, but the language itself. Your example line of > code has, at best, > typing practice in it. Be sure that you are not confused about what you > want and that you > don't need to review the C language as well. Thanks Ian and Jane for you reply's. It was late last night. I should have quite for the day. :) The repcnt = (unsigned short) (* (unsigned short *) li_s); works as expected. Sorry for the error. Ben (P.S. Jane, I am a fluent C programmer from way back. I had just been staring at the code for so long it didn't make sense. This morning the error jumped right out at me. Your message just confirmed my "brain fart". :) -- -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Forever Young Software http://www.cybertrails.com/~fys/index.htm To reply by email, please remove the zzzzzz's Batteries not included, Some assembly required.