I try using IterableMapping
by this example.
I have error when I compiling contract by truffle:
Expected identifier, got 'LParen'
This is my code:
pragma solidity ^0.4.15;
import "./itMapsLib.sol";
contract User
{
using itMaps for itMaps.itMapUintAddress;
itMaps.itMapAddressUint im_myAddressUintMap;
function addOwner(address _key, uint value) returns (bool){
im_myAddressUintMap.insert(_key, value);
return true;
}
function allSum() returns (uint sum)
{
}
}
im_myUintUintMap
anywhere (unless it's somewhere else in code that isn't included in your snippet).im_myUintUintMap
. That variable does't exist. You need to changeim_myUintUintMap.insert()
toim_myAddressUintMap.insert()
.itMaps.itMapUintUint im_myUintUintMap;
)