摘要: 转自: https://blog.csdn.net/weixin_37579123/article/details/89515577 __new__方法:类级别的方法 __init__方法:实例级别的方法 阅读全文
posted @ 2019-07-22 18:09 xushukui 阅读(1187) 评论(0) 推荐(0) 编辑
摘要: 转自: https://studygolang.com/articles/11313 golang中是没有class的,但是有一个结构体struct,有点类似,他没有像java,c++中继承的概念,但是他有一个类似功能的结构嵌入 简单的结构体声明和使用 匿名结构体 函数中结构体作为参数,如果不是用结 阅读全文
posted @ 2019-07-22 16:48 xushukui 阅读(16790) 评论(0) 推荐(1) 编辑
摘要: 转自: https://www.jianshu.com/p/901820e17ffb 结构体基础 匿名结构体在四种常见情景下的用法。 组织全局变量 数据模版 测试案例数据 嵌入式锁 (Embedded lock) 阅读全文
posted @ 2019-07-22 16:35 xushukui 阅读(641) 评论(0) 推荐(0) 编辑
摘要: 转自: http://c.biancheng.net/view/66.html 基本的实例化形式 创建指针类型的结构体 取结构体的地址实例化 阅读全文
posted @ 2019-07-22 16:28 xushukui 阅读(2975) 评论(0) 推荐(0) 编辑
摘要: 转自: https://www.liaotaoo.cn/200.html python package main import "fmt" type student struct{ id int name string score int } func main(){ //结构体数组存储多为学员信息 阅读全文
posted @ 2019-07-22 16:25 xushukui 阅读(10125) 评论(0) 推荐(0) 编辑