Re: define a struct that has its own type as a field somehow?
- From: Ben <x@xxxxx>
- Date: Thu, 26 Oct 2006 13:59:06 GMT
In article <ehqenb$29rc$1@xxxxxxxxxxxxxxxxxxx>, Papastefanos Serafeim
<serafeim@xxxxxxxxx> wrote:
"Ben" <x@xxxxx> wrote in message news:261020061450069968%x@xxxxxxxx
Hello,
Is it possible to define a struct that has a type of itself in it?
Thanks, Ben.
Try this
typedef struct _mystruct {
int a;
struct _mystruct *b;
} mystruct;
Serafeim
Yup, thanks. 'struct' infront does it.
Thanks, Ben.
.
- References:
- define a struct that has its own type as a field somehow?
- From: Ben
- Re: define a struct that has its own type as a field somehow?
- From: Papastefanos Serafeim
- define a struct that has its own type as a field somehow?
- Prev by Date: Re: define a struct that has its own type as a field somehow?
- Next by Date: Re: A simple program , need to see where's the mistake :)
- Previous by thread: Re: define a struct that has its own type as a field somehow?
- Next by thread: Re: define a struct that has its own type as a field somehow?
- Index(es):
Relevant Pages
|