基本概念
- 声明结构的形式:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22(1)
struct point{
int x;
int y;
};
struct point p1,p2; // p1,p2 都是 point,里面有 x,y 的值。
(2)
struct point{
int x;
int y;
}p1,p2; // p1,p2 都是 point,里面有 x,y 的值。
(3)
struct {
int x;
int y;
}p1,p2; //p1 和 p2都是一种⽆无名结构,⾥里⾯面有x和y