Bilingual shenanigans
Bilingual shenanigans
- Subject: Bilingual shenanigans
- From: Dean Tresner <email@hidden>
- Date: Fri, 13 Sep 2002 14:19:25 -0400
I am writing a cocoa app with four class files of the form:
Pretty.m
Plain.mm
Ugly.cpp
Uglier.cpp
Each of which has member variables of the class below. I can't seem to
get the right mix of #include, #import and forward declarations,
bouncing between compiler and linker errors. For instance, if the
header files look like:
Pretty.h:
@class Plain;
@interface Pretty : NSObject {
Plain *x;
...
Plain.h:
class Ugly;
@interface Plain : NSObject {
Ugly y;
...
Ugly.h:
class Uglier;
class Ugly {
Uglier z;
...
the compiler will tell me "y has incomplete type." If I put the
#include directives in the .h files to avoid the forward declarations,
things get even more confusing for both me and the compiler. What's the
right way to do this?
Dean
_______________________________________________
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.