动态长度:
uint[] a
length
push():添加成员
固定长度数组:
uint[5] a
length
struct Employee {
address id;
uint salary;
uint lastPayday;
}
Employee[] employeesfunction addEmployeefunction removeEmployeestruct对象不需要new:Employee(employee, salary, now)return退出,避免gas的无谓消耗var (empl, i)可用于接收两个返回值struct不能暴露出去,有function需要传入或者返回struct类型时需要设置为privatememory中的拷贝;通过index来修改变量的话,改变的就是storage中的值