This is my priority queue practicing code.
#include <stdio.h>
#include <stdlib.h>
#define MAX_ELEMENT 200
typedef struct{
int key;
}element;
typedef struct{
element heap[MAX_ELEMENT];
int heap_size;
}HeapType;
// create function
HeapType* create()
{
return (HeapType*)malloc(sizeof(HeapType));
}
// initialization function
void init(HeapType*h)
{
h->heap_size = 0;
}
When I compile this code, I got a message "undefined reference to `WinMain'"
The program informed me that there was a problem on this line > 'return (HeapType*)malloc(sizeof(HeapType)); '
What can I do for this problem?