title: Attempting to reference a deleted function.
body: <p>I am having difficulty with my code. I am getting the error "AssociativeArray>::Node::Node(void)': attempting to reference a deleted function"</p>
  
  <p>Here is my class</p>
  
  <pre><code>template&lt;typename K, typename V&gt;
  class AssociativeArray
  {
    public:
      AssociativeArray(int = 2);  // default constructor of a capacity of 2
      AssociativeArray(){ delete [] data; }
      AssociativeArray(const AssociativeArray&lt;K,V&gt;&amp;); 
      AssociativeArray&lt;K,V&gt;&amp; operator=(const AssociativeArray&lt;K,V&gt;&amp;);
      V&amp; operator[](const K&amp;); // getter
      V operator[](const K&amp;) const;  // setter
      queue&lt;K&gt; keys() const;
      int size() const {return siz;};
      bool containsKey(const K&amp;) const;
      void deleteKey(const K&amp;);
      void clear();
  
    private: 
      int cap;
      int siz;
      int values;
      void capacity(int);
      struct Node{K key; V value; bool inUse;};
      Node* data;  // data = new Node[cap]
      void ExpandNode(int,int);
  };
  </code></pre>
  
  <p>Here is the constructor which is giving me the problem.</p>
  
  <pre><code>template&lt;typename K, typename V&gt;
  AssociativeArray&lt;K, V&gt;::AssociativeArray(int cap)
  {
    this-&gt;cap = cap;
    this-&gt;siz = 0;
  
    data = new Node[cap];  // ERRORS HERE
  
    for (int index = 0; index &lt; cap; index++)
    {
      data[index].inUse = false;
    }
  }
  </code></pre>
  
  <p>Here is the declaration in main.</p>
  
  <pre><code>AssociativeArray&lt;string, AssociativeArray&lt;string, bool&gt;&gt; seen(10);
  </code></pre>