function getlength()public view returns(uint){
// return name.length; 錯誤
return bytes(name).length;
}
運行合約結果報錯:
browser/vote.sol:8:33: Error: Expected token LBrace got 'View'
function getlength() public view returns(uint){
不知道是不是版本不兼容還是現在這種用法不支持了
轉載請註明出處,本文鏈接:https://www.uj5u.com/houduan/11100.html
標籤:其它技術問題
上一篇:Qt 設計界面
