Skip to content

Instantly share code, notes, and snippets.

@Maxcutex
Created April 8, 2019 06:40
Show Gist options
  • Save Maxcutex/6743d7e23ffc3e9f7d234b141a2b11bd to your computer and use it in GitHub Desktop.
Save Maxcutex/6743d7e23ffc3e9f7d234b141a2b11bd to your computer and use it in GitHub Desktop.
Election Project - Function to add candidate
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