void For instance:
typedef struct THESTRUCT { void* objectPtr; } THESTRUCT;
void* is the "generic" type of pointer. (You must give it to another type in order to use it. Since there is no type to give it to the end of C, it will be an effectively opaque pointer.)
Another approach is to make a direct declaration for your C ++ type without defining it (since this cannot be done at the end of C). Therefore, if your C ++ type is called foo , you can do:
struct foo; typedef struct THESTRUCT { struct foo* objectPtr; } THESTRUCT;
source share