title: Creating a list of nodes attached to each node (c++)
body: <p>I am trying to create each node with a pointer to an array that will contain other nodes (of the same type) within the object's class. </p>
  
  <pre class="lang-cpp prettyprint-override"><code>class node
  {
  public:
      node(int degree, bool visited, int xpos, int ypos);
      node *adjList = new node[9]; 
      float * valueList = new float[832];
      int size = 0;
      int adjSize = 0;
      int xpos, ypos;
      int degree = 0;
      bool visited;
  };
  </code></pre>
  
  <p>The line is </p>
  
  <pre class="lang-cpp prettyprint-override"><code>node *adjList = new node[9]; 
  </code></pre>
  
  <p>This does not work. It is saying there is no matching constructor for this declaration. I tried creating an empty constructor but that sort of breaks my code.</p>
  
  <p>The visualization is this:</p>
  
  <p>NODE:
  [0] ---> [ [3][4]][8] ]</p>