dimanche 2 avril 2017

Function definition not found?

I'm trying to define the function "getCurSize" but for some reason even though I define it below it, it is not recognizing the definition and is underlined in green. (Beginner here so patience appreciated)

template<class ItemType>
class FDHPolynomial
{
private:
    FDHNode<ItemType>* headPtr;
    int itemcount;
    FDHNode<ItemType>* getPointedTo(const ItemType& nodenum) const;

public:
    FDHPolynomial();
    FDHPolynomial(const FDHPolynomial <ItemType>& aPoly);
    virtual ~FDHPolynomial();

    int getCurSize() const;
    bool isEmpty() const;
    bool add(const ItemType& newCoeffi, const ItemType& newExpon);
    bool remove(const ItemType& anExpon);
    void clear();
    bool contains(const ItemType& aExpon) const;
    ItemType degree() const;
    ItemType coefficient(const ItemType& power) const;
    void changeCoefficient(const ItemType& newCoeffi, const ItemType&power);
    std::vector<ItemType> toVector() const;

void print();


};

template<class ItemType>
int Polynomial<ItemType>::getCurSize() const
{
    return itemCount;
}

Aucun commentaire:

Enregistrer un commentaire