0

I have an error like "expected '(' or '{' TreeNodePM :: TreeNodePM() : Node(){"

#include "TreeNodePM.hpp" using namespace std;

template TreeNodePM :: TreeNodePM() : Node(){

this->leftChild = nullptr; this->rightChild = nullptr; this->parent = nullptr;

}

template TreeNodePM :: TreeNodePM(const Type&value) : Node(value) { this->leftChild = nullptr; this->rightChild = nullptr; this->parent = nullptr;

this->setValue(value); }

template TreeNodePM :: TreeNodePM(const Type&value, TreeNodePM * parent) : Node(value) { this->leftChild = nullptr; this->rightChild = nullptr; this->parent = parent;

}

What is wrong with this code? please help me..

1
  • Which course of CS50 is this and which problem set is this?
    – Vsjain
    Nov 5 '20 at 6:00

You must log in to answer this question.

Browse other questions tagged .