Hot answers tagged

2 votes

Push to array of struct type gives an error. Is it related to storage mechanisms of the solidity?

You need to have a constructor for running your initialisation code. You are also creating an array literal of type uint256[2] instead of a dynamic-length, in-memory array uint256[] that happens to ...
Arran Schlosberg's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible