C로 최소(min) heap을 사용하는것인데 incompatible types에러가 뜨네요..




#include <stdio.h>
#include <stdlib.h>

#define max_ele 1200  

typedef struct {
        int key;
        int num;
} ele;

typedef struct {
        ele heap[max_ele];
        int heap_size;
} heapcode;


ele heap[max_ele];


void int_minheap(heapcode *h, ele p)
{
        int i;
        i = ++(h->heap_size);

        while((i != 1) && (p.key < h->heap[i/2].key)){
                h->heap[i] = h->heap[i/2];
                i /= 2;
        }
        h->heap[i] = p;
        heap[i].num = 1;
}



해서 삽입함수를 구현 한 다음; 메인에서..

         ele i;
         int e = 0;
        

        그다음 뭐 함수 쭈욱 쓰고..

        while(fscanf(input_d,"%d",&i)!=EOF)
        {
                int_minheap(&i,e); // error C2115: 'function' : incompatible types  << 요기가 에러납니다;;

                if(fgetc(input_d) == EOF)
                {
                        break;
                }
        }



아무리봐도 모르겠네요.. orz