I have the following code which doesn't compile(solaris). "The Union is not accessible from the struct". When I move the Union to be public, it compiles. Can anyone explain this? I'd like to keep both private if possible. Thanks!
private:
Union MyUnion
{
UObject* uobject;
//other variables here
};
struct MyStruct
{
MyUnion myUnion; //Doesn't compile here
//other variables here
};
private:
Union MyUnion
{
UObject* uobject;
//other variables here
};
struct MyStruct
{
MyUnion myUnion; //Doesn't compile here
//other variables here
};