我在下面两条标记的行上收到错误为“'->'的无效类型参数”请建议如何更正
#include<stdio.h>
struct arr{
int distance;
int vertex;
};
struct heap{
struct arr * array;
int count; //# of elements
int capacity;// size of heap
int heapType; // min heap or max heap
};
int main(){
int i;
struct heap * H=(struct heap *)malloc(sizeof(struct heap));
H->array=(struct arr *)malloc(10*sizeof(struct arr));
H->array[0]->distance=20;//error
i=H->array[0]->distance;//error
printf("%d",i);
}