【发布时间】:2018-05-13 10:49:05
【问题描述】:
我正在编写投票合同,并面临引用 DeclarationError: Identifier not found or not unique.
Voter[] public voters;
^---^
的一些声明错误
这是我下面的完整代码。我不确定我做错了什么。
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);
更多详细代码请访问here
我正在尝试为第一次过去的投票风格创建选票,但是编译失败。我希望有人可以通过并指出一些明显的错误。
【问题讨论】:
标签: blockchain ethereum solidity