1

I currently review and learn some github programs, and I fund in a hpp file:
there is extern "C" to cover all the c header file like stdio.h, stdint.h and so on.

extern "C"
{
    #include <stdio.h>
    #include <stdint.h>
    #include <stdlib.h>
    #include <inttypes.h>
}

I also google how it works and I just wondering if we still need to do that. And which way is better?

1) to cover c header by extern "C";
2) just straightly include that c header files;

kdopen
  • 8,032
  • 7
  • 44
  • 52
crazymumu
  • 101
  • 2
  • 10

0 Answers0