Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/xslt/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ethereum 如何初始化包含空地址数组的结构? pragma solidity>=0.4.22_Ethereum_Solidity - Fatal编程技术网

Ethereum 如何初始化包含空地址数组的结构? pragma solidity>=0.4.22

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

试试这个-大括号中的0表示正在初始化大小为0的动态数组

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));