• 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: Problem with defining an opaque structure
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Problem with defining an opaque structure


  • Subject: Re: Problem with defining an opaque structure
  • From: Chris Ridd <email@hidden>
  • Date: Mon, 19 Aug 2002 15:26:12 +0100

On 19/8/02 2:41 pm, Pierre-Olivier Latour <email@hidden> wrote:

> Hi,
>
> I'm trying to define an opaque structure:
>
> struct OpaqueStructure;
> typedef struct OpaqueStructure;
> typedef OpaqueStructure* OpaqueStructurePtr;
>
> typedef struct {
> OpaqueStructurePtr stuff;
> } OtherStructure;
>
> OpaqueStructure content would be defined in another place of the source
> code.
>
> This does not work as GCC gets me the following errors:

How about something like this:

typedef struct OpaqueStructure *OpaqueType;

...
OpaqueType foo;

> main.m:13: undefined type, found `OpaqueStructure'

NB without any ine numbers in your example, these errors are hard to
understand :-)

Cheers,

Chris
_______________________________________________
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.

References: 
 >Problem with defining an opaque structure (From: Pierre-Olivier Latour <email@hidden>)

  • Prev by Date: Printing in COCOA
  • Next by Date: Dialing in Jaguar
  • Previous by thread: Problem with defining an opaque structure
  • Next by thread: Re: Problem with defining an opaque structure
  • Index(es):
    • Date
    • Thread