Open tanpv opened 6 years ago
I mean array of candidate object.
I found this in solidity docs "Mappings can be seen as hash tables which are virtually initialized such that every possible key exists and is mapped to a value whose byte-representation is all zeros: a type’s default value. The similarity ends here, though: The key data is not actually stored in a mapping, only its hash used to look up the value.". I think this is the reason.
and we get a free getter method in mapping, so why not use it :)
Because candidates has attributes (id, vote count)