Templates???

R

Rupert harrison

How would i template the object of my class BSTree, which is defined
outside my class.
template <class xtype>
class BSTree
{

class TNode
{
TNode *right;
TNode *left;

public:
char *info;

friend class BSTree <xtpye>;
};

Tnode *root


};
static BSTree mark

(eg. static BSTree mark) so that it has access to my functions in main.?
 
G

Gianni Mariani

Rupert said:
How would i template the object of my class BSTree, which is defined
outside my class.

English please. :)

Sorry, but I really don't understand the context of your question. Your
refer to "my class" and you refer to a template and there is one below
which seems to be what you're interested in but I don't get how they are
supposed to be related.
template <class xtype>
class BSTree
{

class TNode
{
TNode *right;
TNode *left;

public:
char *info;

friend class BSTree <xtpye>;
};

Tnode *root


};
static BSTree mark

(eg. static BSTree mark) so that it has access to my functions in main.?

What are you trying to do ?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,143
Messages
2,570,822
Members
47,368
Latest member
michaelsmithh

Latest Threads

Top