Closed summershrimp closed 4 years ago
I think it would be easier with a
#ifdef __cplusplus
extern "C" {
#endif
...
#ifdef __cplusplus
}
#endif
block instead of c++-ifying the entire file.
Nope, extern "C" { }
block cannot handle all the difference between C and CPP. You can try
extern "C" {
#include “mdns.h”
}
in a cpp file, still a lot of compiler errors.
Fair enough, I'm not a huge fan of c++-ifying c code, but I can see the use here in a header-only case :)
C++ has more strict type conversion check. It still compatible with C.