• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Bilingual shenanigans
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Follow-Ups:
    • Re: Bilingual shenanigans
      • From: Ondra Cada <email@hidden>
    • Re: Bilingual shenanigans
      • From: "David W. Halliday" <email@hidden>
    • Re: Bilingual shenanigans
      • From: "Timothy J. Wood" <email@hidden>
  • Prev by Date: Re: setFrameUsingName , setFrameAutosaveName
  • Next by Date: Open source
  • Previous by thread: Re: Scope of [NSMutableDictionary setObject:] in an array
  • Next by thread: Re: Bilingual shenanigans
  • Index(es):
    • Date
    • Thread