I'm mixing Objective-C and C++. However I want to minimize using of Objective-C++. Because it has some kind of limits in both of Objective-C and C++.
Currently, I'm using it like this.
// A.h, Objective-C
#import "B.h"
@interface A
{
B* b;
}
@end
// B.h, Objective-C++
@interface B
{
void* c;
}
// C.h, C++
class C
{
};
I want to include C.h
in B.h
, but if I did it, B.h
cannot be imported into A.h
. So I have to leave variable c
as void*
type. This is not a big problem because I can use members of C
in B.m
file freely. But I always have to cast it. This feels something unclear. So I want to use better way if it is.