3 ms·
Have you seen practical cases where there has been issues because C code is not compatible with C++? The blog has nice toy examples, but would be nice to know i
by Laakeri 7y ago
Have you seen practical cases where there has been issues because C code is not compatible with C++? The blog has nice toy examples, but would be nice to know if they actually occur in the wild.
- loeg 7y agoYes, all the time. Off the top of my head, I've run into: - C++ does not support 'foo([static N])' function declarations - C++ does not support 'struct A a = { .b = c, ... }' initializers The conflict arises when these are used in C headers, and then C++ programs attempt to include them.