go语言基础语法:面向对象编程

1、匿名组合函数 1.匿名字段初始化3d type Person struct { name string sex byte age int } type Student struct { Person//只有类型,没有名字,匿名字段,继承了Person里面的成员 id int addr string } func main() { //顺序初始化 var s1 Stude
相关文章
相关标签/搜索