3 Replies - 499 Views - Last Post: 01 October 2008 - 09:00 PM Rate Topic: -----

#1 oasisjoel  Icon User is offline

  • D.I.C Regular

Reputation: 4
  • View blog
  • Posts: 274
  • Joined: 11-September 08

Difference of C and C++

Post icon  Posted 30 September 2008 - 08:37 AM

May I ask, what are the difference of C and C++? Do they both codes? Can I use C codes to C++? How about Vice Versa? Is C same as Clanguage?
Is This A Good Question/Topic? 0
  • +

Replies To: Difference of C and C++

#2 William_Wilson  Icon User is offline

  • lost in compilation
  • member icon

Reputation: 205
  • View blog
  • Posts: 4,807
  • Joined: 23-December 05

Re: Difference of C and C++

Posted 30 September 2008 - 08:43 AM

Some are listed here with examples.
Was This Post Helpful? 0
  • +
  • -

#3 RedSonja  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 10
  • View blog
  • Posts: 172
  • Joined: 04-September 08

Re: Difference of C and C++

Posted 30 September 2008 - 11:50 PM

Your C++ compiler will compile C, but not vice versa. C++ is C with the ability to program in an object-oriented manner. Typical C is a struct, in C++ this is a class, with some useful methods added. The good bit is inheritance and overloading operators, C can't do this.

Having said that, I know a few people who are still writing C and claiming it is C++. The difference is non-trivial, you can't learn it in one day. Sign up for a course.
Was This Post Helpful? 0
  • +
  • -

#4 Logomachist  Icon User is offline

  • D.I.C Head

Reputation: 5
  • View blog
  • Posts: 74
  • Joined: 10-March 08

Re: Difference of C and C++

Posted 01 October 2008 - 09:00 PM

For the most part, C++ is a superset of C but they've made some changes to it (and C is continuing to evolve) so not ALL C code will be compatible with C++.

But most will.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1