Re: Problem with defining an opaque structure
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.