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();
                 }
                 }
Nick Evan commented: After 58 posts and > 1 year of membership, you still do not understand how this site works. -3

What problems are you experiencing now?

commented: Snap +1
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.