我可以在混音IDE中写吗?
我制作了地址类型的动态数组变量, ie,
address payable[] public participant;
这是以下以及为什么写的正确
uint payable[] public participant;
方法
uint[] payable public participant;
enter code here
I made a dynamic array variable of address type, i.e.,
address payable[] public participant;
which one is the correct way to write in the following and why,
uint payable[] public participant;
or
uint[] payable public participant;
enter code here
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
有
地址
及其扩展<代码>地址应付,它允许您使用本机transfer()
方法将ETH发送到此地址。由于该类型被称为
地址应付
,因此您可以通过在类型名称之后附加[]
表达式来制作此类型的数组。没有
付款
扩展到uint
。如果您的目标是定义要发送的金额,则可以存储在常规uint
中。There's
address
and its extensionaddress payable
, which allows you to use the nativetransfer()
method to send ETH to this address.Since the type is called
address payable
, you can make an array of this type by appending the[]
expression after the type name.There's no
payable
extension touint
. If your aim is to define an amount to be sent, that can be stored in a regularuint
.