如何解决“警告:不建议使用“ var”关键字”?

时间:2018-11-06 06:24:49

标签: solidity

enter image description here


我尝试使用auto instructor = instructors[_address],但出现错误:
DeclarationError: Identifier not found or not unique.

1 个答案:

答案 0 :(得分:0)

您可以先定义变量的类型,然后再将其分配给各自的值。您的情况是:

Instructor storage instructor = instructors[_address]