title: No appropriate default constructor available on struct
body: <p><strong>Disclaimer:</strong> I have looked at other questions that could be familiar to this situation however I have found no solution</p>
  
  <p><strong>Situation:</strong> I am attempting to create a linked list of the type Levelnode (a struct). upon creating the new node it should create a new level (level class).</p>
  
  <p><strong>Problem:</strong> I receive an error on line 18 (The .cpp file, not the header file) with - </p>
  
  <pre><code>Error   2   error C2512: 'Levelnode' : no appropriate default constructor available c:\users\timi\desktop\ludum dare\ld27\nodes.cpp 18  1   LD27
  </code></pre>
  
  <p>I do have a default constructor in the header file so I really don't see why this error is occuring.</p>
  
  <p>here is the Nodes.h header file:</p>
  
  <pre><code>    #ifndef NODES_H
  #define NODES_H
  
  #include &lt;iostream&gt;
  #include &lt;string&gt;
  #include "structs.h"
  #include "Level.h"
  
  
  using namespace std;
  
  class Nodes 
  {
      private:
  
          Levelnode * p;
          Level * level;
  
      public:
          Nodes()
          {
  
          }
  
          ~Nodes();
          Levelnode * CreateNode(Level * newLevel, SDL_Surface *screen1, string levelName, SDL_Rect camera1);
          void InsertAfter(Levelnode * p, Levelnode * newNode);
          Levelnode * InsertFirst(Levelnode * p, Levelnode * newNode);
          void DeleteNode(Levelnode * p);
          void PrintList(Levelnode * p);
  };
  #endif
  </code></pre>
  
  <p>here is the .cpp file:</p>
  
  <pre><code>#include &lt;Windows.h&gt;
  #include &lt;iostream&gt;
  #include &lt;string&gt;
  #include "Nodes.h"
  #include "structs.h"
  #include "Level.h"
  
  
      Nodes::~Nodes()
      {
  
  
      }
  
      Levelnode * Nodes::CreateNode(Level * newLevel, SDL_Surface *screen1, string levelName, SDL_Rect camera1)
      {
          Levelnode * newNode;
          newNode = new Levelnode;
          level = new Level(screen1, levelName, camera1);
          level-&gt;draw();
          newNode-&gt;L = *newLevel;
          newNode-&gt;next = NULL;
          return newNode;
      }
  
      void Nodes::InsertAfter(Levelnode * p, Levelnode * newNode)
      {
          newNode-&gt;next = p-&gt;next;
          p-&gt;next = newNode;
      }
  
      Levelnode * Nodes::InsertFirst(Levelnode * p, Levelnode * newNode)
      {
          newNode-&gt;next = p;
          return newNode;
      }
  
      void Nodes::DeleteNode(Levelnode * p)
      {
          Levelnode * pTemp;
          while ( p != NULL)
          {
              pTemp = p;
              p = p-&gt;next;
              delete pTemp;
  
          }
      }
  
      void Nodes::PrintList(Levelnode * p)
      {
          while (p != NULL)
          {
              p-&gt;L.draw();
              p = p-&gt;next;
          }
  
      }
  </code></pre>
  
  <p>struct header file:</p>
  
  <pre><code>#ifndef STRUCTS_H
  #define STRUCTS_H
  #include &lt;Windows.h&gt;
  #include &lt;string&gt;
  #include "Level.h"
  
  using namespace std;
  
  struct position
  {
      int x;
      int y;
  };
  
  
  struct Levelnode
  {
      Level L;
      Levelnode * next;
  };
  
  #endif
  </code></pre>