Memory overflow when running graphic code in C++
#include <bits/stdc++.h> #include <graphics.h> #define E exp(1) #define Pi M_PI using namespace std; struct tNode{ string data; tNode *pLeft, *pRight; }; tNode *root; tNode *newNode(string data){ tNode *node = (tNode*)malloc(sizeof(tNode)); node->data = data; node->pLeft = NULL; node->pRight = NULL; return node; } // Check int heightOfTree(tNode *root){ if(root==NULL) return 0; int height = 1; if(root->pLeft==NULL […]