Ethereum 如何初始化包含空地址数组的结构? pragma solidity>=0.4.22
试试这个-大括号中的0表示正在初始化大小为0的动态数组Ethereum 如何初始化包含空地址数组的结构? pragma solidity>=0.4.22,ethereum,solidity,Ethereum,Solidity,试试这个-大括号中的0表示正在初始化大小为0的动态数组 pragma solidity >=0.4.22 <0.7.0; contract Storage { struct Client { bool enrolled; bytes32 fullName; address[] reference; } Client newClient = Client(true, 0x7465737400000000000
pragma solidity >=0.4.22 <0.7.0;
contract Storage {
struct Client {
bool enrolled;
bytes32 fullName;
address[] reference;
}
Client newClient = Client(true, 0x7465737400000000000000000000000000000000000000000000000000000000, address[]);
}
Client newClient = Client(true, 0x7465737400000000000000000000000000000000000000000000000000000000, new address[](0));