Is C a subset of C++ or ANSI C ?

Martin O'Nions martino at logitek.co.uk
Fri Dec 28 20:29:35 AEST 1990


hooverm at sysjj.mdcbbs.com (SQUID 6 on the DARK side) writes:

>1) Is Borland "C" a subset of ANSI "C"?
>2) Is Borland "C" a subset of "C++"? 

>The reason for these questions is this:  I'm taking a programming class in "C"
>which will be using the Borland "C" software.  I got a copy of Borland "C++"
>for Christmas.  Will I be able to do my assignments at home, or will I be 
>lacking some functionality by using the "C++"?  The "C++" includes ANSI C as 
>well.

>Also, it there a "generally considered to be definitive" book on C or C++?

If you want to be accurate, ANSI C and C++ are supersets of C, rather than
C being a subset of either (yes I do know that C++ mucks a couple of things
around, but it still holds true).

We have the Borland product here, and I have no reason so far to disbelieve
its claim to be fully ANSI and C++ 2.0 complient - if you have any problems
compiling a particular set of source, try using one of the switches to
recognise ONLY K&R keywords/constructions, ANSI or C++ 2.0.

In summary, go for it; be carefull however in your use of library calls.
The C++ documentation lists which are compatible with what, so it best to
stick with those which are not unique to this release of the compiler....

Martin
--
DISCLAIMER: All My Own Work (Unless stated otherwise)
--------------------------------------------------------------------------
Martin O'Nions            Logitek Group Support      martino at logitek.co.uk
--------------------------------------------------------------------------
There's been an accident they said/Your servant's cut in half - he's dead!
Indeed said Mr Jones, then please/Send me the half that's got my keys.
         (Harry Graham - Ruthless Rhymes for Heartless Homes)



More information about the Comp.lang.c mailing list