Created
April 8, 2019 06:40
-
-
Save Maxcutex/6743d7e23ffc3e9f7d234b141a2b11bd to your computer and use it in GitHub Desktop.
Election Project - Function to add candidate
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
contract Election { | |
// ... | |
function addCandidate (string _name) private { | |
candidatesCount ++; | |
candidates[candidatesCount] = Candidate(candidatesCount, _name, 0); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment