1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Call insert function statement

Discussion in 'C' started by aquarius2236, Oct 22, 2007.

  1. aquarius2236

    aquarius2236 New Member

    Joined:
    Oct 22, 2007
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    0
    template <class T>
    class BasicMinMaxHeap {
    public:
    void insert(const T& elt);}
    --------------------------------------
    template <class T>
    void BasicMinMaxHeap<T>::insert(const T& elt) {
    if(lastindex == maxsize) grow();

    cerr << "insert: " << elt << endl;

    lastindex++;
    A[lastindex] = elt;
    bubbleUp(lastindex);
    }

    void main(){

    // if i want to call the above insert function, what is the statement look like?? <--------- Question
    }
     

Share This Page