Including C headers inside a C++ program

For a list of C standard C headers (stdio, stdlib, assert, …), prepend a c and remove the .h.
For example stdio.h becomes cstdio.

For other headers, use

extern "C"
{
  #include "other_header.h"
}

Leave a Comment