A
Anonymous
I have legacy C code that performs some required functionality. I want
to notify my C++ classes after work has been completed in the C code. In
otherwords, I need to call a C++ method from C.
Some PSEUDO code may help:
/* C++ code */
class MyFooClass
{
public:
NotifyHandler();
};
/* C code */
#ifdef __cplusplus
extern "C" {
#endif
void foo()
{
/* Do some work */
/* finish work */
/* Notify C++ class via callback here */
}
#ifdef __cplusplus
};
#endif
to notify my C++ classes after work has been completed in the C code. In
otherwords, I need to call a C++ method from C.
Some PSEUDO code may help:
/* C++ code */
class MyFooClass
{
public:
NotifyHandler();
};
/* C code */
#ifdef __cplusplus
extern "C" {
#endif
void foo()
{
/* Do some work */
/* finish work */
/* Notify C++ class via callback here */
}
#ifdef __cplusplus
};
#endif