Quantcast
Viewing latest article 22
Browse Latest Browse All 39

Answer by rmn for How do I call a C++ function from C?

If you use a C++ compiler (say g++ instead of gcc), you can call C++ code from your C code seamlessly and everything will work just fine.This will be the case since unless you're doing something really strange, C is contained within C++..

And if it still does not work when you compile with g++, you should change file suffix from .c to .cc, .cpp, .cxx, etc. Preferably .cc


Viewing latest article 22
Browse Latest Browse All 39

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>