For the most part, C++ is a superset of C. You can write C code, rename the file with a .cpp extension, and the compiler will compile it in C++ mode, generating essentially the same code. In fact, the very first C++ compilers were actually C compilers with extra pre-processing. But there are some subtle differences, and I recently ran into one that has some important implications.