From: Christopher Croughton Message-Id: <97Jul23.085741gmt+0100.17025@internet01.amc.de> Subject: Re: sizeof() in #if To: chirayu AT radiolink DOT net (Chirayu Krishnappa) Date: Wed, 23 Jul 1997 08:02:24 +0100 Cc: crough45 AT amc DOT de, djgpp AT delorie DOT com In-Reply-To: <1.5.4.16.19970723075717.0e7f306e@giasbga.vsnl.net.in> from "Chirayu Krishnappa" at Jul 23, 97 04:20:28 am Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk Chirayu Krishnappa wrote: > > >However, all is not lost. There is a very useful header file > >defined in the ANSI standard which contains things about the sizes > >of variables. It's called limits.h. Among the things it defines > > Thanks! I'm using this approach now. The only problem with it is that it's clumsy and in CS terms "not elegant". I would really like some 'elegant' code to do it - as it is, I go with what works... > Me always use unsigned char. In Borland C++, I had a compiler switch, in > GCC, I do it explictly! Warning: with -Wall (all warnings on) passing a pointer to an array of unsigned char to the string functions often causes loads of warning messages. You can't win... > Sorry. And BTW, I dunno anything about newsgroups, etc. Some html page had > this djgpp mailing group bit and I registered. Thats all. Cd u tell me if > something similair is possibe for a c++ newsgroup? I don't know of any C++ newsgroups available as a mailing list. Perhaps if someone does they could tell us. I also can't get newsgroups, so I'm in the same position as you. But some useful URLs: comp.lang.c Answers to Frequently Asked Questions (FAQ List) http://www.cis.ohio-state.edu/hypertext/faq/usenet/C-faq/faq/faq.html 1997 C++ Public Review Document http://www.maths.warwick.ac.uk/c++/pub/wp/html/cd2/ The latter is the 'current' C++ specification online. I believe it's a mirror of the (American) main site, but it's the one in my bookmark list. Of course, trying to find anything in there is a challenge: "you are lost in a maze of twisty specifications, all looking completely different"... Hope that helps, Chris