I am having a problem with undefined reference errors. I get the following errors:
[Linker error] undefined reference to `operator>>(std::istream&, Voter&)'
[Linker error] undefined reference to `Voter::~Voter()' 
[Linker error] undefined reference to `Voter::~Voter()'
ld returned 1 exit status 
I am using Bloodshed dev C++ 4.9
My code:
Voter.h
#include <iostream>
#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& V);
               friend istream & operator>>(istream & ins, Voter & V);
               friend ostream & operator<<(ostream & outs, Voter & V);
};
#endif
ClassVoter.cpp
    #include "Voter.h"
    #include <iostream>
    #include <string>
    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 & V)
    { 
      voted++;
      return voted;    
    }
    istream & operator >>(istream & ins, Voter & V)
    {
      ins >> V.ID >> V.nr_times_voted >> V.voted;
    }
    ostream & operator <<(ostream & outs, Voter & V)
    {
      outs << " Voters that want to vote: " << endl;
      outs << V.ID << endl;
      return outs;
    }
TestVoter.cpp
#include "Voter.h"
#include <iostream>
#include <fstream> 
#include <cstdlib> 
#include <string>
using namespace std;
int main()
{
   ifstream infile;
   ofstream outfile;
   Voter ID;
   cout << "Enter your Voter ID: ";
   cin >> ID;
   infile.open("VotersRoll.dat");
   outfile.open("UpdatedVoters.dat");
   infile.close();
   outfile.close();   
   system("pause");
   return 0;
} 
 
     
     
    