I am quite a beginner to both C and C++ and I have a fundamental question - I come across various code snippets, some in C and some in C++. Sometimes, it would really be nice to be able to combine these two together. I saw OpenCV C code being saved as .cpp and compiled with g++ (example here).
I tried to combine some code - I guess C++ compiler is most likely able to compile C code, but I faced incompatible data structures between OpenCV C and C++ API. Is it possible to write hybrid code then?