plz help me in my algorithm to first enter data in array then making a min heap out of it
#include <iostream>
#include <stdlib>
using namespace std;
class Heap
{
int currentsize;
int *array;
int capacity;
void heapsort(int[],int);
public:
void buildheap();
void isempty();
void isfull();
int getsize();
}
main()
{
int a[100];
int n;
int i;
cout<<"please enter the number of element u want to sort in heap:";
cin>>n;
cout<<"enter the number:";
for(i=1;i<=n;i++)
{
cin>>a[i];
buildheap();
}
}