Typedef
Typedef作用:起别名
1>typedef int Interger;
2>typedef char * string;
3>typedef struct student stu;
4>typedef enum Season season;
5>typedef int (*MyPointer)(int, int);// 指向函数的指针
6>typedef struct Person
{
int age;
} myPerson;
7>typedef enum Week
{
monday;
tuesday;
wendsday;
} myWeek;
使用宏定义起别名:
1>#define Interger int
#define string char *
2>typedef int Interger;
typedef char * string; |
|