Wikia

C Plus Plus

Watchlist Recent changes

What are the differences between C and C++

C vs C++Edit

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
  • In both C and C++, the function void foo (void) means the function takes no parameter. However, in C, the function void foo () means the function takes unspecified number of parameters with unspecified types, while in C++ it means the function takes no parameter.

Pages on C Plus Plus

Add a Page
15pages on
this wiki
Advertisement | Your ad here

Latest Photos

Add a Photo
3photos on this wiki
See more >

Recent Wiki Activity

See more >

Around Wikia's network

Random Wiki