I have several files written in C and I want them to be compatible with C ++, so for my C headers I use;
#ifdef __cplusplus
extern "C" {
#endif
at the beginning of the file and of course
#ifdef __cplusplus
}
#endif
... in the end. But this creates problems with the keyword "inline". My solution is to simply remove the inline keyword for C ++, but I assume that this may have a bad effect for C ++ programs (these functions are called gazillions times).
Is there a better solution?
source
share