you will need to pass in &heap which is of type heap **.
OK. This works. Instead of the
HeapCreate(heap, 1, (heapcomparefunc)rec_cmp);
The calling of the function of the HeapCreate(&heap, 1, (heapcomparefunc)rec_cmp);
And you WILL need to initialise heap before you use it.
Will I need to malloc for this structure heap sepratately in the main function? How it will be ?