I need to add a number to existing value in array under index 'id'. I have the following code:
contract Store {
uint256[] public totalamt;
function append(uint256 id,uint price) payable{
totalamt[id] = totalamt[id] + price;
}
}
Array is not initialized.Each time I need to update the array.Help will be appreciated :)