nvm guys i made a stupid mistake... thnxs for the help tho...
Type: Posts; User: azncoolj2000
nvm guys i made a stupid mistake... thnxs for the help tho...
no errors... but when i try to delete a node in the tree, a msg is outputed to the user that the node is deleted with some data printed out to the user... that data that should be printed out doesnt...
the tree struct has a long occupancy
and the tnode struct has a long & occupancy which references the tree occupancy. So, how would I decrement the tnode occupancy in a tnode destructor?
unsigned long Remove (TNode<Whatever> & elementTNode,
TNode<Whatever> *& PointerInParent,
long fromSHB = FALSE) {
if(elementTNode.data == data) {...
Ok in my tree program, I have to use a reference to occupancy in my tnod struct. So In my destructor
~TNode (void) {
occupancy--;
delete data;
}
Ok so I am building a tree using c++
In my remove function
and I am using a reference (TNode<Whatever> & elementTNode) to point to the deleted data in a node in the tree (TNode<Whatever> *)... So,...
sorry, I am confused in what that means... does that mean I need to change something in my main? or in my tree constructor?
the error when I run the gdb (debug) says that:
warning: Source file is more recent than executable.
46 occupancy++;
...
Hi, I have a problem understanding how to increment the occupancy in my constructor is it looks like dis:
template <class Whatever>
struct TNode {
long balance;
Whatever data;
long...