.Help me with my code errors please c++
CandidateType.cpp
#include
#include
#include
#include “candidateType.h”
using namespace std;
void candidateType::setVotes(int region, int votes)
{
votesByRegion[region – 1] = votes;
}
void candidateType::updateVotesByRegion(int region, intvotes)
{
votesByRegion[region – 1] = votesByRegion[region – 1]+ votes;
}
void candidateType::calculateTotalVotes()
{
totalVotes = 0;
for (int i = 0; i < NO_OF_REGIONS; i++)
totalVotes +=votesByRegion[i];
}
int candidateType::getTotalVotes() const
{
return totalVotes;
}
void candidateType::printData() const
{
cout << left
<< setw(10) <<firstName << ” “
<< setw(10) << lastName<< ” “;
cout << right;
for (int i = 0; i < NO_OF_REGIONS; i++)
cout << setw(7) <<votesByRegion[i] << ” “;
cout << setw(7) << totalVotes <<endl;
}
candidateType::candidateType()
{
for (int i =