inheritate from template class

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • vertigo

    inheritate from template class

    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

  • Arne Adams

    #2
    Re: inheritate from template class

    "vertigo" <none@dev.nul l> schrieb im Newsbeitrag
    news:chc4sp$93a $1@nemesis.news .tpi.pl...[color=blue]
    > 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
    > {
    > }
    >[/color]
    make it

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



    Arne


    Comment

    • Arne Adams

      #3
      Re: inheritate from template class

      oooops

      "Arne Adams" <Arne.Adams@t-online.de> schrieb im Newsbeitrag
      news:chc54v$sdq $03$1@news.t-online.com...[color=blue]
      > make it
      >
      > template class<X>
      > class MyListenSocket: public ListenSocket<X>
      > {
      > };
      >[/color]
      should be
      template <class X>
      class ListenSocket: public Socket
      {
      };

      and

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


      Arne


      Comment

      Working...