1、内存布局
type Persion {
name string
age int
}
2、结构体的域在内存中是紧挨着排列的。
type Persion {
name string
age int
}
type Couple1 struct {
p1,p2 Persion
}
type Couple2 struct {
p1,p2 *Persion
}
1、内存布局
type Persion {
name string
age int
}
2、结构体的域在内存中是紧挨着排列的。
type Persion {
name string
age int
}
type Couple1 struct {
p1,p2 Persion
}
type Couple2 struct {
p1,p2 *Persion
}