Quote:
Code between #ifdef __cplusplus and #endif (of course, the right #endif) is included when the header is included to a C++ file. It allows to have one header for C and C++.
|
I assumed that, but why does there need to be extern "C" { } in a cpp header?
Quote:
its needed so you can call a c function from cpp
|
So C & C++ have different calling conventions??