J
Juha Nieminen
Let's assume that you are using an old C library which header file
you can't change and which has something along the lines of:
#ifdef __cplusplus
extern "C" {
#endif
struct Whatever
{
int class;
...
};
#ifdef __cplusplus
}
#endif
Let's also assume that you are writing a C++ program where you
simply must use the library. How would you use that struct and
its 'class' member variable in your C++ code? Let's assume that
you can't isolate the code that uses that struct into its own
C module, but that it must be C++.
Is it even possible?
you can't change and which has something along the lines of:
#ifdef __cplusplus
extern "C" {
#endif
struct Whatever
{
int class;
...
};
#ifdef __cplusplus
}
#endif
Let's also assume that you are writing a C++ program where you
simply must use the library. How would you use that struct and
its 'class' member variable in your C++ code? Let's assume that
you can't isolate the code that uses that struct into its own
C module, but that it must be C++.
Is it even possible?