i need to write a library in c++ , usable by client to do some operations in a remote server. The only thing in the specific i haven't done yet it's: The c++ library need a C interface. Let me explain better: From client using this lib i need to do call something like: int operation(void* addr); if int<0 error and so.. But the library it's a class in c++. So my answer is.. Need I a global variable holding the instance of class in the library? The are some better option to develop this C interface of C++ class?
Thx in advice for answer.
See Question&Answers more detail:os