From: Roman Suzi Newsgroups: comp.os.msdos.djgpp Subject: Re: [Q]: unsigned char --- C and C++ difference!!! Date: Wed, 29 Oct 97 23:02:12 +0300 Distribution: su Organization: unknown Message-ID: Sender: news-service AT sampo DOT karelia DOT ru Reply-To: nuser AT rsuzi DOT pgu DOT karelia DOT ru Lines: 40 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk Hi! Eli Zaretskii wrote: >On Wed, 29 Oct 1997, Roman Suzi wrote: > >> >I think you are missing the fact that '\xFD' is NOT a character constant, >> >it's an int. Therefore, -funsigned-char doesn't affect it. >> >> NO!!! It has sizeof('\xFD') == 1 >> >> I have just checked it. >> That is, it is char all right! > >Is it in C or in C++? I tested this in a C program, and it printed >4 for sizeof('\xFD'). Maybe you tried it in C++. These are two >different languages when such subtle points are concerned. Yes, you are RIGHT!!! I have used C++. When I renamed the program to probe.c -- the sizeof('\xFD') changed to 4 !!! I have never heard of such *tremendous* differences between C and C++. I just wonder, how much other 'subtle' differences there exist between C and C++ ? And how great is the difference between major "dialects" of C++ (DJGPP, BC 3.1, Watcom, etc) is also interesting. S.y., Roman Suzi -- -- * -- -- Roman A. Suzi * Petrozavodsk Karelia Russia -- -- http://www.angelfire.com/ks/sudensivu --