Re: Bilingual shenanigans
Re: Bilingual shenanigans
- Subject: Re: Bilingual shenanigans
- From: "Timothy J. Wood" <email@hidden>
- Date: Fri, 13 Sep 2002 12:11:53 -0700
On Friday, September 13, 2002, at 11:19 AM, Dean Tresner wrote:
Plain.h:
class Ugly;
@interface Plain : NSObject {
Ugly y;
Be forewarned -- this will NOT call Ugly::Ugly() when -init is called
on Plain. The ObjC runtime knows nothing about C++ constructors.
Additionally, the cause for your problem here (and in the 'Ugly'
class) is that you are forward declaring the C++ class, but defining a
real instance of it. The compiler doesn't know how big it is here, so
it can't compile this code.
You either need to import Ugly.h here or change your @interface to
have a 'Ugly *' instead of 'Ugly' (and then do a 'new' in your -init
method).
-tim
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.