C and C++?

Match word(s).

If you have any questions or comments,
please visit us on the Forums.

FAQ > What's the difference between... > C and C++?

This item was added on: 2003/03/13

Put simply, C++ is an extended C meant to improve safety, give the programmer more options, simplify higher level programming, and offer a better approach to large scale programming. C++ is also a larger language with more features and complexity than C, but C++ can improve productivity with its greater amount of features. A list of features that C++ supports which C does not includes:

  • Classes

  • Member functions

  • Constructors and destructors

  • Derived classes

  • Virtual functions

  • Abstract classes

  • Access control (public, private, protected)

  • friend functions

  • Pointers to members

  • static members

  • mutable members

  • Operator overloading

  • References

  • Templates

  • Inline functions

  • Default arguments

  • Function overloading

  • Namespaces

  • Exception handling

  • Run-time type identification

  • // comments

  • True const

  • Declarations as statements

  • Automatically typedef'd struct tags

  • Type safe linkage

  • new and delete

  • bool keyword

  • Safer and more robust casting

For explicit "gotchas" that throw off C programmers using C++, or C++ programmers using C, see our page on C vs C++.

Credit: Prelude

Script provided by SmartCGIs