C 语言提供了 typedef 关键字,您可以使用它来为类型取一个新的名字。
typedef用于给一个已经存在的数据类型重命名,typedef本质上不能产生新的类型。
typedef重命名的数据类型:
用法:
typedef type new_name;
#include <stdio.h>
typedef int Int32;
struct _tag_point
{
    int x;
    int y;
};
typedef struct _tag_point Point;
typedef struct //连续的写法
{
    int length;
    int array[];
} SoftArray; 
typedef struct _tag_list_node ListNode;//_tag_list_node可以在typedef语句之后定义
struct _tag_list_node
{
    ListNode* next;//可以直接使用typedef的数据类型 
};
int main()
{
    Int32 i = -100;        // int 
    //unsigned Int32 ii = 0;// 加上unsigned会编译出错!!!
    Point p;               // struct _tag_point
    SoftArray* sa = NULL;   
    ListNode* node = NULL; // struct _tag_list_node*
    return 0;
}
                                        本文链接:http://so.lmcjl.com/news/23751/