title: base operand of ‘->’ has non-pointer type
body: <p>First, the code: </p>
  
  <pre><code>// ...
  
  struct node_list {
      node_list *prev;
      node *target;     // node is defined elsewhere in the application
      node_list *next;
      };
  
  node_list nl_head;
  
  int main() {
      nl_head-&gt;prev = &amp;nl_head;
      // ...
      return 0;
      }
  </code></pre>
  
  <p>I get an error: </p>
  
  <pre><code>make (in directory: #####)
  g++ -Wall -std=c++11 -o main main.cc
  main.cc: In function ‘int main(int, char**)’:
  main.cc:38:9: error: base operand of ‘-&gt;’ has non-pointer type ‘node_list’
    nl_head-&gt;prev = &amp;nl_head;
           ^
  Makefile:8: recipe for target 'main' failed
  make: *** [main] Error 1
  Compilation failed.
  </code></pre>
  
  <p>As far as I can tell my syntax is correct. Can anyone point out the error?</p>
  
  <p>Before anyone flags it as a duplicate, I am aware it is similar to a couple other questions but none of their solutions seem to work for me. Unless I'm doing it wrong, which I'll admit is possible, but that's why I'm here.</p>