Date: Thu, 30 Oct 1997 14:29:25 +0200 (IST) From: Eli Zaretskii To: Roman Suzi cc: djgpp AT delorie DOT com Subject: Re: [Q]: unsigned char --- C and C++ difference!!! In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Precedence: bulk On Wed, 29 Oct 1997, Roman Suzi wrote: > 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++ ? This is a common misconception. Many people erroneously believe that C++ is a proper superset of C, so anything that will compile in C, will also compile in C++ and produce identical results. This is simply NOT TRUE. C++ is a DIFFERENT LANGUAGE; the differences might be subtle, but they are SIGNIFICANT. So, if you want to write a C program, call it foo.c and compile it as C program. Do NOT call it foo.cc or foo.cpp and do NOT compile it as C++. It might work, but it will get you in trouble one day. Another (deliberately perverse) example of difference between these languages can be found in section 8.3 of the DJGPP FAQ list.