I saw in couple of tree codes that a function of tree class has both * and & with node for example to insert a node in a BST a function is like this
insertnode(node * &t,string value)
{
t = new node; t-> val = value
// code to find right place in BST
}
I wish to know why we pass reference to pointer in general and also in particular to this case . Please also mention if there is any other scenario of this ,Thanks
Instead of posting another question . Can someone also point out the use of object class ? i mean using instances of object class did it allocate all the memory gone for all sub classes ? i.e int float etc. etc.