Group: comp.lang.c++
From: Ian Collins
Date: Wednesday, April 09, 2008 3:31 PM
Subject: Re: C or C++

Ioannis Vranos wrote:
> Ian Collins wrote:
>> Ioannis Vranos wrote:
>>> Carmen Sei wrote:
>>>> if I need to write C++, I will be forced to learn C automatically?
>>>>
>>>> Since I saw many C++ code need to call C library also.
>>>>
>>>> Most program use a combination of C++ code and calling C functions.
>>>>
>>>> Then writting C++, I cannot avoid learning C right?
>>> With minor exceptions C95 (ISO/IEC 9899:1995) is a subset of C++
>>> (ISO/IEC 14882:2003).
>> No, they are not "minor exceptions".
>
>
> Supposing you are not talking about the word "exception", the exceptions
> I know are the following:
>
>
> 1. Not implicit void * to any other pointer type conversion, as in C95.
> 2. 'a' is a char in C++ and not an int as in C95.
> 3. 0 is to be preferred than NULL, which does not apply to C95.
> 4. POD types can be considered as char/unsigned char sequences in C++,
> but only as unsigned char sequences in C95.
> 5. Empty parentheses in function declarations/definitions are equivalent
> to void in C++, but is a different thing in C95.
>
> Have I forgotten anything?

Implicit int, missing function prototypes, use of const, assignments to
enums...

--
Ian Collins.

Safety Articles | Usenet Groups | Usenet News | Bluegrass