struct A{int a;int b;};struct A *pA = NULL;pA = (struct A *)malloc(sizeof(struct A)*N);N为结构体个数用完记得用free(pA)施放内存。
假如有个student结构体,则student a=new student[n]();就可以了 想申请多少就多少
struct yourtype{};yourtype *ptype =(yourtype *) malloc(yourtype);