title: no instance of constructor matches the argument list, but I am passing in a nullptr to a constructor that takes a pointer and a default value
body: <p>We have to create a polynomial class for homework, and I've just started writing mine.</p>
  <p>My error is occuring in my implementation/.cpp file in the List default constructor. Specifically, the error reads</p>
  <blockquote>
  <p>no instance of constructor &quot;Polynomial::List::Node::Node&quot; matches the argument list -- argument types are: (std::nullptr_t)</p>
  </blockquote>
  <p>This is my header file</p>
  <pre><code>#ifndef POLYNOMIAL
  #define POLYNOMIAL
  
  #include &lt;vector&gt;
  
  class Polynomial {
  public:
      Polynomial(); 
      Polynomial(std::vector&lt;int&gt;);
  private:
      class List {
      public:
          List();
          void addToEnd(int); 
      private:
          struct Node {
              Node(Node*, int = 0);
              Node* next;
              int coefficient;
          }; 
          Node* head; 
          Node* last_node; 
      };
      List coefficients; 
      int degree; 
  };
  
  #endif
  </code></pre>
  <p>This is my implementation file</p>
  <pre><code>#include &quot;polynomial.hpp&quot;
  using namespace std; 
  
  // Polynomial Constructors/Methods
  
  Polynomial::Polynomial() : coefficients(), degree(0) {}
  
  Polynomial::Polynomial(vector&lt;int&gt; coefficients) {}
  
  
  // List constructors/Methods
  
  Polynomial::List::List() : 
  head(new Node(nullptr)) {} // error (as described in title) is happening on this line
  
  
  // Node constructors/Methods
  Polynomial::List::Node::Node(Node* next, int coefficient) 
  : next(next), coefficient(coefficient) {} 
  </code></pre>
  <p>I have a feeling this problem has to do with not qualifying my constructors properly in my .cpp file, as I'm not sure what else the problem could be.</p>
  <p>However, I've tried writing the problem line as such but I get the same problem:</p>
  <pre><code>head(new Polynomial::List::Node(nullptr)) {}
  </code></pre>
  <p>I know there are tons of questions similar to mine on StackOverflow already, but the other problems I've found occur because people are missing constructors entirely, or the constructors they use take arguments different to what they are passed. As far as I can tell, I'm using the Node struct's constructor appropriately.</p>
  <p><strong>EDIT</strong>: I've been told that this compiled fine on someone else's system. Also, my error is in the form of a red squiggle that occurred without me having to compile. I assumed this meant I had a compilation error that VS code &quot;caught early&quot;, but I don't know how true that is. Perhaps I have an issue with my VS Code configuration, or the C++ extension I'm using?</p>