Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- constructor(bytes32[] memory proposalNames) public {
- chairperson = msg.sender;
- voters[chairperson].weight = 1;
- // For each of the provided proposal names,
- // create a new proposal object and add it
- // to the end of the array.
- for (uint i = 0; i < proposalNames.length; i++) {
- // `Proposal({...})` creates a temporary
- // Proposal object and `proposals.push(...)`
- // appends it to the end of `proposals`.
- proposals.push(Proposal({
- name: proposalNames[i],
- voteCount: 0
- }));
- }
- }
- struct A{
- uint date,
- B[] b
- }
- struct A{
- uint date
- }
- struct B{
- string goods,
- uint quantity
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement