title: How to get the address of node->next pointer
body: <p>I was writing code on Doubly Linked List for the following function </p>
  
  <pre><code>struct node {
      int data;
      struct node *next;
      struct node *prev;
  };
  
  /* Given a node as next_node, insert a new node before the given node */
  void insertBefore(struct node** next_node, int new_data)
  </code></pre>
  
  <p>I called the insertBefore() from the main function:</p>
  
  <pre><code> insertBefore(&amp;head, 2);  // it works fine
  </code></pre>
  
  <p>But i can't do the same fore head->next, because next pointer is just node* Not node**</p>
  
  <pre><code>insertBefore(head-&gt;(&amp;next), 2);  // it doesn't works 
  </code></pre>
  
  <p>How can i solve the problem.please help.Thanks</p>