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

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice