title: Why is NULL undeclared?
body: <p>I have a problem with this struct contructor when I try to compile this code:</p>
  
  <pre><code>typedef struct Node
  {
      Node( int data ) //
      {
          this-&gt;data = data;
          previous = NULL; // Compiler indicates here
          next = NULL;
      }
  
      int data;
      Node* previous;
      Node* next;
  } NODE;
  </code></pre>
  
  <p>when I come this error occurs:</p>
  
  <pre><code>\linkedlist\linkedlist.h||In constructor `Node::Node(int)':|
  \linkedlist\linkedlist.h|9|error: `NULL' was not declared in this scope|
      ||=== Build finished: 1 errors, 0 warnings ===|
  </code></pre>
  
  <p>Last problem was the struct, but it worked fine when it was in my main.cpp, this time it's in a header file and is giving me this problem. I am using Code::Blocks to compile this code</p>