摘要: 结构体是用户定义的类型,表示一系列的集合。语法为 :type关键字 结构体名字 struct{ } 1.结构体声明 type Person struct { name string sex int age int sex,age int # 由于age和sex是相同类型的字段,可以定义在同一行 } 阅读全文
posted @ 2019-12-13 21:05 kuanglinfeng 阅读(270) 评论(0) 推荐(0)