How can I declare a pointer structure?

Posted by Y_Y on Stack Overflow See other posts from Stack Overflow or by Y_Y
Published on 2010-04-27T03:50:08Z Indexed on 2010/04/27 3:53 UTC
Read the original article Hit count: 238

Filed under:
|
|

This probably is one of the easiest questions ever in C programming language...

I have the following code:

typedef struct node
{
  int data;
  struct node * after;
  struct node * before;
}node;

struct node head = {10,&head,&head};

Is there a way I can make head to be *head [make it a pointer] and still have the availability to use '{ }' [{10,&head,&head}] to declare an instance of head?

© Stack Overflow or respective owner

Related posts about c

    Related posts about structures