C & C++

C++ is a superset of C, meaning all C code is valid C++. However, C++ code is linked differently, if you want to retain C style linking you need to add some preprocessor directives. This probably isn't important unless you are writing some sort of library. So yeah, you can use any valid C in C++.

>Dosen't that depend on the compiler?
No, it is because C++ is more strongly typed than C so implicit conversion of void pointers is disallowed. Any conforming C compiler will allow this, and any conforming C++ compiler will not.

Guess that's defined by ANSI C++ (the whole casting thing) didn't know that, but you learn something new everyday. That means some of those C++ books and tutorials are wrong about "all C is valid C++". Watch out everyone.

when they call C a subset of C++ they aren't saying that ALL syntax without exception is carried over but that the language for the most part is carried over. This is a pretty legitimate claim considering the fact that you have to dig into something like a cast to say they are different. Also, you can't use "new" as a variable name in C++ where you can in C. well DUH!! That doesn't make C less of a subset. It's still pretty much contained in C++. So yes, you can use C code in C++.

The C programming language and the C++ programming language have different standards. In some cases people use a C compiler when writing C code and a C++ compiler when writing C++ code. They are different langauges.

I think that C++ supports almost all of the langauge features of ANSI C, even most of the C99 features.

The C++er should use libraries such as the STL and take advantage of the design features of OOP.