title: C++ symbol referencing error
body: <p>I've been trying to find what the problem is to this following code part. I've written a custom exception class where I have a base class for stack errors, and then some classes deriving from it one of them called <code>stack_full_error</code>.
  I have some problem compiling it though, I get the following error.</p>
  
  <pre><code>Undefined                       first referenced
   symbol                             in file
  stack_error::~stack_error()         /var/tmp//ccFwZ5Kd.o
  ld: fatal: Symbol referencing errors. No output written to a.out
  collect2: ld returned 1 exit status
  </code></pre>
  
  <p>It says something about the destructor, and I have been trying some things to fix it, with no success. Anyway I hope someone can tell me what the problem is.</p>
  
  <pre><code>class stack_error : public exception
  {
  public:
     stack_error(string const&amp; m) throw()
        : exception(), msg(m) {};
     virtual ~stack_error() throw() =0;
     virtual const char* what() const throw()
     {
        return msg.c_str();
     }
  
  private:
     string msg;
  };
  
  class stack_full_error : public stack_error
  {
  public:
     stack_full_error() throw()
        : stack_error("Exception: stack full") {};
     ~stack_full_error() throw() {};
  };
  </code></pre>
  
  <p>And here where I call the exception for this first time</p>
  
  <pre><code>template &lt;class T&gt;
  void Stack&lt;T&gt;::push(T i)
  {   
     if(is_full())
        throw stack_full_error();
  
     this-&gt;first = new Node&lt;T&gt;(this-&gt;first, i);
     amount++;
  }
  </code></pre>