[comp.lang.c] Is C a subset of C++ or ANSI C ?

hooverm@sysjj.mdcbbs.com (SQUID 6 on the DARK side) (12/26/90)

A couple o' questions from a "C" neophyte...
All questions refer to Borland products running on a PC

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++?

	Please feel free to respond by E-Mail if you would like.


			Mark  <o===6

mdb@abcom.ATT.COM (5013 ) (12/28/90)

From article <1990Dec26.102742.1@sysjj.mdcbbs.com>, by hooverm@sysjj.mdcbbs.com (SQUID 6 on the DARK side):
> A couple o' questions from a "C" neophyte...
> All questions refer to Borland products running on a PC
> 
> 1) Is Borland "C" a subset of ANSI "C"?
> 2) Is Borland "C" a subset of "C++"? 
> 
TURBO C++ is really two packages in one. It is an ANSI 'C' compiler as 
well as a C++ compiler.

To switch between the both all you need to do is change the extention.

	.C == ANSI C
	.CPP == C++

Hope this helps
MIke Barnes

martino@logitek.co.uk (Martin O'Nions) (12/28/90)

hooverm@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@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)