我想在C++类中包装一个C库.对于我的C++类,我也希望这些C函数使用相同的声明:是否可以这样做?
例如,如果我有以下情况,如何区分C函数和C++函数?我想打电话给C一个.
extern int my_foo( int val ); //
class MyClass{
public:
int my_foo( int val ){
// what to write here to use
// the C functions?
// If I call my_foo(val) it will call
// the class function not the global one
}
}
Run Code Online (Sandbox Code Playgroud)