2.4. Structs#
Syntax#
Struct Types#
Structs are custom defined types that can group several variables. They can be defined inside or outside contracts.
You can also create new objects of this struct using the following syntax:
contract MyContract {
function create() public {
Voter memory v = Voter({
delegate: msg.sender,
vote: 1
});
}
}
Note
This section is under construction. You are more than welcome to contribute suggestions to our GitHub repository.