One commonly encountered difference is that C allows implicit conversion from
void* to other pointer types, but C++ does not. Another common portability issue is that C++ defines many new keywords, such as new and class, that may be used as identifiers (e.g. variable names) in a C program.Some incompatibilities have been removed by the latest (C99) C standard, which now supports C++ features such as line comments (
//), and mixed declarations and code. On the other hand, C99 introduced a number of new features that C++ does not support, such as variable-length arrays, native complex-number types, designated initializers, and compound literals. However, at least some of the new C99 features will likely be included in the next version of the C++ standard