Undefined reference errors
<p>Goodday,</p>

<p>I am having a problem with undefined reference errors. I get the following errors. If I could get some guidance it would be super.</p>

<pre><code>[Linker error] undefined reference to `operator&gt;&gt;(std::istream&amp;, Voter&amp;)'
[Linker error] undefined reference to `Voter::~Voter()' 
[Linker error] undefined reference to `Voter::~Voter()'
ld returned 1 exit status 
</code></pre>

<p>I am using Bloodshed dev C++ 4.9</p>

<p>My code:</p>

<p><strong>Voter.h</strong></p>

<pre><code>#include &lt;iostream&gt;
#ifndef VOTER_H
#define VOTER_H

using namespace std;
class Voter
{
      private:
              string ID;
              int nr_times_voted;
              bool voted;

      public:
             Voter()
             {
               ID = " ";
               nr_times_voted = 0;
               voted = false;
             }

             Voter(string newVoter)
             {
               ID = "0000";
               nr_times_voted = 0;
               voted = false;
             }

              ~Voter();     
              string getID();
              int getnr_times_voted();
              bool getvoted();
              void set_voted()
              {
                voted = true;
              }

               friend Voter operator++(Voter&amp; V);
               friend istream &amp; operator&gt;&gt;(istream &amp; ins, Voter &amp; V);
               friend ostream &amp; operator&lt;&lt;(ostream &amp; outs, Voter &amp; V);
};
#endif
</code></pre>

<p><strong>ClassVoter.cpp</strong></p>

<pre><code>    #include "Voter.h"
    #include &lt;iostream&gt;
    #include &lt;string&gt;

    using namespace std;

    //Accessors to retrieve data from each of the member variables
    string Voter:: getID()
    {
      return ID;
    }

    int Voter:: getnr_times_voted()
    {
      return nr_times_voted;
    }

    bool Voter:: getvoted()
    {
      return voted;
    }

    //destructor
    Voter::~Voter()
    {}

    void operator++(voted &amp; V)
    { 
      voted++;
      return voted;    
    }

    istream &amp; operator &gt;&gt;(istream &amp; ins, Voter &amp; V)
    {
      ins &gt;&gt; V.ID &gt;&gt; V.nr_times_voted &gt;&gt; V.voted;
    }


    ostream &amp; operator &lt;&lt;(ostream &amp; outs, Voter &amp; V)
    {
      outs &lt;&lt; " Voters that want to vote: " &lt;&lt; endl;
      outs &lt;&lt; V.ID &lt;&lt; endl;
      return outs;
    }
</code></pre>

<p><strong>TestVoter.cpp</strong></p>

<pre><code>#include "Voter.h"
#include &lt;iostream&gt;
#include &lt;fstream&gt; 
#include &lt;cstdlib&gt; 
#include &lt;string&gt;

using namespace std;

int main()
{
   ifstream infile;
   ofstream outfile;
   Voter ID;

   cout &lt;&lt; "Enter your Voter ID: ";
   cin &gt;&gt; ID;

   infile.open("VotersRoll.dat");
   outfile.open("UpdatedVoters.dat");

   infile.close();
   outfile.close();   

   system("pause");
   return 0;
} 
</code></pre>
