A89: Re: tigcc - some REAL routines this time [OT]


[Prev][Next][Index][Thread]

A89: Re: tigcc - some REAL routines this time [OT]



>Actually, let me pose a question:  Is C a subset of C++?  In comp.lang.c
>they're always very quick to insist that it is NOT, because not all C
>compiles under C++.  On the other hand, I was in a bookstore yesterday and
>looked up Bjorn Stroustroup's _The C++ Programming Language, 3rd Edition_
>where he states that it is.  Now I'm confused =)
>
>    -Scott


I remembered that C _was_ a subset of C++, but couldn't remember where it
was I read it so I looked around. Well, I found two books that agree.

_C++ for Dummies 2nd edition_, by Stephen R. Davis says:
"C++ is, at its core, C. It's almost upwardly compatible. Anything C can do,
C++ can do too. C++ can even do it the same way."

_C++ from the ground up_, by Herbert Schildt says:
"...C++ is built upon the foundation of C. In fact, C++ is a superset of C.
(Indeed, all C++ compilers can also be used to compile C programs!)..."

These books combined with what Scott Noveck read in Bjorn Stoustroup's book
"The C++ Programming Language, 3rd Edition" I must conclude that C is a
subset of C++. Therefore all C code _should_ compile in any C++ compiler (I
would be interested to see some that didn't).

Besides if I went against Bjorn Stoustroup I would be kind of stupid now
wouldn't I.

Anyone else have any opinions?

    ALT_255 - webmaster@communitycrc.org

P.S. Please don't make fun of me for the dummies book, It was given to me
and I am to cheap to throw it out :)