title: getting an error of undeclared node in compiling a simple linked list program
body: <p><strong>code</strong></p>
  
  <pre><code>#include &lt;stdio.h&gt;
  
  void main()
  {
       struct Node      //defining a node
       {
            int data;             //defining the data member
            struct Node *next;    //defining a pointer to Node type variable
       };
  
        struct Node *head;        //declaring a pointer variable 'head' to a Node type variable.   
        head=NULL;                //Since the head pointer now points nothing,so initialised with NULL.
  
        struct Node* temp = (Node*)malloc(sizeof(struct Node));//creating a node and storing its adrs in pointer 'temp'
       (*temp).data=2;          //node's data part is initialised.
       (*temp).next= NULL;    //the node points to nothing initially
       head=temp;             //head is initialised with address of the node,so now it points to the node 
  
       printf("%d",temp-&gt;data);
   }
  </code></pre>