inheritate from template class

V

vertigo

Hello
i have template class:
template class<X>
class ListenSocket: public Socket
{
}

and i want to create class which inheritate from ListenSocket.
I tried:
template class<X>
class MyListenSocket: public ListenSocket
{
}

but i receive errors. How should it looks like ?

Thanx
Michal
 
A

Arne Adams

vertigo said:
Hello
i have template class:
template class<X>
class ListenSocket: public Socket
{
}

and i want to create class which inheritate from ListenSocket.
I tried:
template class<X>
class MyListenSocket: public ListenSocket
{
}
make it

template class<X>
class MyListenSocket: public ListenSocket<X>
{
};



Arne
 
A

Arne Adams

oooops

Arne Adams said:
make it

template class<X>
class MyListenSocket: public ListenSocket<X>
{
};
should be
template <class X>
class ListenSocket: public Socket
{
};

and

template <class X>
class MyListenSocket: public ListenSocket<X>
{
};


Arne
 

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

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top