Re: co-definition of classes
Re: co-definition of classes
- Subject: Re: co-definition of classes
- From: Bill Bumgarner <email@hidden>
- Date: Fri, 28 Sep 2007 20:52:54 -0700
On Sep 28, 2007, at 8:34 PM, Roland Silver wrote:
Is there some way to co-define two classes which reference each other?
The compiler barfs (error: parse error before 'Bar') at the following:
#import <Cocoa/Cocoa.h>
@class Bar;
@interface Foo : NSObject {
Bar* bar;
}
@end
@class Foo;
@interface Bar : NSObject {
Foo* foo;
}
@end
Obviously, you only need the @class on the one that comes before the
declaration of the other...
b.bum
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden