• 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
Re: Strange compile error
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Strange compile error


  • Subject: Re: Strange compile error
  • From: Ricky Sharp <email@hidden>
  • Date: Wed, 14 Jul 2004 10:29:58 -0500

On Wednesday, July 14, 2004, at 10:20AM, Theodore H. Smith <email@hidden> wrote:

>I'm compiling this code:
>
>struct f3Line {
> float X;
> float Y;
> float X2;
> float Y2;
>};
>struct f3LineCache {
> long CurrLine;
> f3Line Lines[64];
>};

I believe this is what is called having an anonymous struct. You'll either have to add the struct keyword before your f3Line usage in the f3LineCache struct:

struct f3LineCache {
long CurrLine;
struct f3Line Lines[64];
};

Or, you can typedef them:

typedef struct {
float X;
float Y;
float X2;
float Y2;
} f3Line;

typedef struct {
long CurrLine;
f3Line Lines[64];
} f3LineCache;

-
Rick Sharp
Instant Interactive(tm)
_______________________________________________
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.


  • Prev by Date: performKeyEquivalent disables Command-Q hotkey
  • Next by Date: Re: Child and Parent windows have dysfunctional relationship?
  • Previous by thread: Re: Any Cocoa/Obj-c Report Engines?
  • Next by thread: Re: Strange compile error
  • Index(es):
    • Date
    • Thread