The tree works right?
I don't have any experience with pointer lists, so take some salt. Note, I'm taking this as if you have to do this in one function.
Firstly, I think you need to change the function a bit:
1 2 3
//this is inside the class, remove the initialization for the one outside.
template<int x>
void insert(Node * n = new Node{x,NULL,NULL}, Node * current = root, Node * temp = NULL);
(obviously remove the initialization inside the function)
Then remove the current = root, change the while statement to be an if statement, and at the end of it, call the function with the right values.
> void Btree::insert(Node * topNode,int x)
read about passing arguments by value and by reference.
any change may to `topNode' inside the `insert()' function would not be visible from outside. That means that you never insert anything, you are just leaking memory