why,我的struct不能赋值?help

yy158954945yy158954945 Member Posts: 0
uint numberOperators;
mapping (uint => Operator) operatores;

//结构体
struct Operator {
string name;
uint256 balance;
address mAddress;
uint createdTime;
}

function creatOperator(uint _index,string _name) returns (uint) {
Operator o = operatores[_index];
o.balance ++;
numberOperators ++ ;
return o.balance;
}


调用creatOperator执行完numberOperators还是0
但是注释掉 o.balance ++;就可以
numberOperators = 1 是这正确的
麻烦帮忙看看
Sign In or Register to comment.