Technology
 

Differences in C and Cpp

From C Plus Plus

[edit] C vs C++

There are many differences in C and C++, the following is a list of many of these differences

  • A void pointer cannot be implicitly casted to another pointer (eg. char *buf = malloc(10) must be changed to char *buf = (char*)malloc(10) )
  • A C typedef does not allow duplicate names, but C++ does
  • All C enums are of int, but C++ enums do not have to
  • C++ has a built in bool type with true and false