第一种方法:定义结构体,传入函数时取地址。
typedef struct
{
int top;
int bottom;
int left;
int right;
}RECT_S;
RECT_S pstRule;
status = perim_Init(&pstRule, 20, 30);
第二种方法:定义指针结构体
typedef struct
{
int top;
int bottom;
int left;
int right;
}RECT_S;
RECT_S *pstRule=NULL;
pstRule = (RECT_S *)malloc(sizeof(RECT_S));
status = perim_Init(pstRule, 20, 30);