I'm trying to implement a destructor but I'm getting an error of memory leakage of some kind
this isn't the actual code but it is how I'm having a problem with, mainly the part of delete the dynamic array of char inside the struct.
am I doing it right?
class::func(const string& mytext)
head = new Node[sizeof(Node)];
head->text = new char[strlen(mytext.c_str())];
delete head->ptr; //here is the error happening