结构
//建立node结构类型
struct node{
int col;
int data;
};
struct node a; //声明一个node结构
struct node row[30]; //node结构数组
枚举
//assign continuous integers to variables(to use these variables in the program)
//method 1
#define MON 1
#define TUE 2
#define WED 3
#define THU 4
#define FRI 5
#define SAT 6
#define SUN 7
//method 2
enum am {MON=1,TUE,WED,THU,FRI,SAT,SUN}; //from the first assigned value, accumulate
//difference: in method 2, the varibles still exist after compiling
网友评论