The only reasons you could save the project as “pure C” are either because of source code compatibility, tool support, or because of language standards (MISRA-C, etc.). “I want him to feel clean,” is probably not a very rational argument.
If you save code like pure C for such reasons, you could write a “shell” of the DLL (assuming Windows) in C ++, which makes all communication with your third-party API. Of course, you get a little overhead.
Strange error messages are undoubtedly caused by more severe typing in C ++, which can be a blessing or a scourge, depending on the situation. The C ++ compiler is more likely to hit with its fingers when it encounters dangerous implicit types (integer promotions, etc.), and this is likely to lead to a tightening of the "correctness of the competition." But at the same time, he will moan about void pointers, which are considered good general C programming, but dangerous, messy, and possibly redundant in C ++.
source share