c++ - terminate called after throwing an instance of 'std::invalid_argument' what(): dataItem already in tree Abort (core dumped) -
i'm getting error terminate called after throwing instance of 'std::invalid_argument'what(): dataitem in tree abort (core dumped) i've tried , can't think of possibly fix i'm assuming im storing tree when stored have no idea, appreciated below code - use bintree , binnode : #include <iostream> #include <string> #include <ctype.h> #include <fstream> #include <stdlib.h> #include "bintree.h" #include "binnode.h" using namespace std; class mazepoint { private: int x; char pointtype; public: void setpointmaze(char ch, int i) { pointtype = ch; x = i; } bool operator == (const mazepoint &other) const { return(this->x == other.x); } bool operator < (const mazepoint &other) const { return(this->x < other.x); } }; class mazerow { private: bintree<mazepoint> points; int y; public: void setmazer...