Go/面向對象特性/匿名字段-繼承

# 經過匿名字段實現繼承特性code package main import "fmt" func main() { type Persion struct{ name string age int } type Stu struct{ Persion //匿名字段 只有類型沒用名字 no int socre int } var s Stu = Stu{
相關文章
相關標籤/搜索