Sometimes you have to include some C code in C++ codes and make your C code work with C++ code together. To achieve that, you have to include some C header files like this:
extern "C" {
// some C functions declarations
#include "my-C-code.h"
}
As simple as that. Check here for some more C/C++ FAQs.