proper syntax for recusive call within template function?

I've got something like this and can't figure out the right syntax to get it to working:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
template <class Item1, class Item2>
class test
{
 // class definition
};

template <class Item1, class Item2>
void function( test<Item1,Item2>* &ptr_test, Item1 var1, Item2 var2)
{
 // Do some stuff...

 // What should this line look like?
 function(ptr_test, var1, var2);
 
 // More stuff...
}


function will be a non member function. Any help would be appreciated
Last edited on
Is that syntax not working? What errors are you getting?
Sorry, meant to post the error:

no matching function for call to ‘insertNode(bstNode<int, int>*, int&, int&)’...

insertNode = function( )
bstNode = class test


edit: also forgot something in original post... ptr_test should be by reference.
Info w/ error:
no known conversion for argument 1 from ‘bstNode<int, int>*’ to ‘bstNode<int, int>*&’
Last edited on
Topic archived. No new replies allowed.