pragma solidity ^0.6.0;
pragma experimental ABIEncoderV2;
interface IPeople {
struct Student {
uint status;
}
function getStudent(address _productAddr) external view returns (Student memory) ;
}
pragma solidity >=0.6.0;
contract Want {
IPeople public _people =IPeople(0xCcCCccccCCCCcCCCCCCcCcCccCcCCCcCcccccccC) ;
function hi()external {
address _pAddr = 0xbBbBBBBbbBBBbbbBbbBbbbbBBbBbbbbBbBbbBBbB;
IPeople.Student memory _p = _people.getStudent(_pAddr);
}
}
请教一下代码里面的IPeople.Student 不能这样用吗,合约部署没问题,但是函数调用会失败