Explain how to call C functions from C++.
- The extern keyword is used to call C functions from C++.
- This works only for non-member functions.
Example:extern ācā void showme()
- If you want to call a member functions including virtual functions from C, you just need to provide a simple wrapper.
Example:extern āCā double call_c_f(C* p, int j) //wrapper function