访问成员struct变量的正确语法是什么?我目前正在尝试这样:
原文链接:https://www.f2er.com/swift/318857.htmlstruct one { var name:String = "Ric" var address:String = "Lee" } one.name
但最后一行产生错误:
‘one.Type’ does not have a member named ‘name’
如何在我的struct上访问变量?