I am writing contract for voting and facing few declartion error as quoted DeclarationError: Identifier not found or not unique.
Voter[] public voters;
^---^
This is my complete code below. I am not sure what I am doing wrong.
contract Ballot {
int public majorityVotes;
Candidate[] public candidates;
mapping (address => uint) public voterId;
Voter[] public voters;
event CandidateAdded (uint candidateId, uint amount, string description);
event Voted (uint candidateId, int result, address voter);
event Tallyvotes (uint candidateId, int result, uint tally, bool active);
for more detail code visit here
I am trying to create ballot for first past post voting style, However compilation fails. I hope someone can go through and point out some obvious mistakes.