C++ Cannot instantiate abstract class error : <p>I'm a returning college student and my code is really rusty since its been years. We have a program where he gave us a UML template. Anyways im getting a c2259 error, cannot instantiate abstract classes, when I compile and I cannot find the issue. Any ideas? </p>

<pre><code>#ifndef OLISTTYPE_H
#define OLISTTYPE_H

#include "ListType.h"

template &lt;class T&gt;
class OListType: public ListType&lt;T&gt; {
 public:

 bool insert(const T&amp;);
void insertFirst(const T&amp;);
void insertLast(const T&amp;);
bool find(const T&amp;) const;

};


template &lt;class T&gt;
 bool OListType&lt;T&gt;::find(const T&amp; item) const {
NodeType&lt;T&gt;* temp = this-&gt;head;
while (temp != NULL &amp;&amp; temp-&gt;info &lt; item) {
    temp = temp-&gt;link;
}
return(temp != NULL &amp;&amp; temp-&gt;info == item);
 }


template &lt;class T&gt;
bool OListType&lt;T&gt;::insert(const T&amp; newItem) {
NodeType&lt;T&gt; *current;
NodeType&lt;T&gt; *trailCurrent;
NodeType&lt;T&gt; *newNode;

bool found;

newNode = new NodeType&lt;T&gt;;
newNode-&gt;info = newItem;
newNode-&gt;link = nullptr;

if (first == nullptr) {
    first = newNode;
    last = newNode;
    count++;
}
else {
    current = first;
    found = false;
    while (current != nullptr &amp;&amp; !found)
        if (current-&gt;info &gt;= newItem)
            found = true;
        else {
            trailCurrent = current;
            current = current-&gt;link;
        }

        if (current == first) {
            newNode-&gt;link = first;
            first = newNode;
            count++;
        }
        else {
            trailCurrent-&gt;link = newNode;
            newNode-&gt;link = current;
            if (current == nullptr)
                last = newNode;
            count++;
        }
}
}
template&lt;class T&gt;
void OListType&lt;T&gt;::insertFirst(const T&amp; newItem) {
insert(newItem);
}
template&lt;class T&gt;
void OListType&lt;T&gt;::insertLast(const T&amp; newItem) {
insert(newItem);
}
#endif
</code></pre>

<p>ListType.h </p>

<hr>

<pre><code>#ifndef LISTTYPE__H
#define LISTTYPE__H

#include &lt;cstddef&gt;
#include "Nodetype.h"
#include &lt;iostream&gt;

template &lt;class T&gt;

class ListType {

 public:
ListType();
ListType(const ListType&lt;T&gt;&amp;);
virtual ~ListType();
bool operator=(const ListType&lt;T&gt;&amp; right) const;
virtual bool insert(const T&amp;) = 0;
virtual bool eraseAll();
virtual bool erase(const T&amp;) = 0;
bool find(const T&amp;) const;
size_t size() const;
bool empty() const;
friend std::ostream&amp; operator&lt;&lt; (std::ostream&amp;, const ListType&amp;);

 protected:
int count;
NodeType&lt;T&gt; *first;
NodeType&lt;T&gt; *last; 
private:
void destroy();
void copy(const ListType&lt;T&gt;&amp;);


};

 template &lt;class T&gt;
 ListType&lt;T&gt;::ListType()
{
first = nullptr;
last = nullptr;
count = 0;
 }

 template &lt;class T&gt;
 ListType&lt;T&gt;::ListType(const ListType&lt;T&gt;&amp; otherList) {
first = nullptr;
copyList(otherList);
 }

 template &lt;class T&gt;
  ListType&lt;T&gt;::~ListType() {
destroy();
  }

 template&lt;class T&gt;
 bool ListType&lt;T&gt;::operator=(const ListType&lt;T&gt;&amp; right) const  
 {
return (current = right.current);
 } 



 template &lt;class T&gt;
bool ListType&lt;T&gt;::eraseAll() {
head = 0;
return true;
}
 template &lt;class T&gt;
 bool ListType&lt;T&gt;::erase(const T&amp; it) {
if (head == 0)
{
    return false;
}
else
{
    struct NodeType&lt;T&gt; *u = head-&gt;next, *p = head;
    if (head-&gt;item == it)
    {
        head = head-&gt;next;
        return true;
    }
    while (u != 0 &amp;&amp; u-&gt;next != 0)
    {
        if (u-&gt;item == it)
        {
            p-&gt;next = u-&gt;next;
            return true;
        }
        u = u-&gt;next;
        p = p-&gt;next;
    }
    if (u-&gt;next == 0 &amp;&amp; u-&gt;item == it)
    {
        p-&gt;next = 0;
        return true;
    }
    return false;
}
}
 template &lt;class T&gt;
 bool ListType&lt;T&gt;::find(const T&amp; it) const {
 if (head == 0)
{
    return false;
}
else
{
    struct NodeType&lt;T&gt; *p = head;
    while (p-&gt;next != 0)
    {
        if (p-&gt;item == it)
        {
            return true;
        }
        p = p-&gt;next;
    }
    return false;
  }
  }

template &lt;class T&gt;
size_t ListType&lt;T&gt;::size() const {
return count;
}

template &lt;class T&gt; 
bool ListType&lt;T&gt;::empty() const
 {
   return (first == nullptr);
 }



 template &lt;class T&gt;
void ListType&lt;T&gt;::destroy() {
NodeType&lt;T&gt; *temp;
while (first != nullptr)
{
    temp = first;
    first = first-&gt;link;
    delete temp;
}

last = nullptr;
count = 0;
} 



 template &lt;class T&gt;
void ListType&lt;T&gt;::copy(const ListType&lt;T&gt;&amp; otherList) {
nodeType&lt;Type&gt; *newNode;
nodeType&lt;Type&gt; *current;

if (first != nullptr)
    destroylist();
if (otherList.first = nullptr)
{
    first = nullptr;
    last = nullptr;
    count = 0;
}
else {
    current = otherList.first;
    count = otherList.count;
    first = new NodeType&lt;T&gt;;
    first-&gt;info = current-&gt;info;
    first-&gt;link = nullptr
    last = first;
    current = current-&gt;link;
    while (current != nullptr) {
        newNode = new NodeType&lt;Type&gt;;
        newNode-&gt;info = current-&gt;info;
        newNode-&gt;link = nullptr;
        last-&gt;link = newNode; 
        last = newNode;
        current = current-&gt;link; 
    }
}
 }

template &lt;class T&gt;
std::ostream &amp;operator&lt;&lt; (std::ostream &amp;out, const ListType&lt;T&gt; &amp;list) {
if (list.head) {
    NodeType&lt;T&gt; *temp = list.head;
    out &lt;&lt; list.head-&gt;item;
    temp = temp-&gt;next;
    while (temp != 0) {
        out &lt;&lt; "," &lt;&lt; temp-&gt;item;
        temp = temp-&gt;next;
    }
}
return out;
}
#endif
</code></pre>
