inheritate from template class

Discussion in 'C++' started by vertigo, Sep 4, 2004.

  1. vertigo

    vertigo Guest

    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
    vertigo, Sep 4, 2004
    #1
    1. Advertising

  2. vertigo

    Arne Adams Guest

    "vertigo" <> schrieb im Newsbeitrag
    news:chc4sp$93a$...
    > 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
    Arne Adams, Sep 4, 2004
    #2
    1. Advertising

  3. vertigo

    Arne Adams Guest

    oooops

    "Arne Adams" <> schrieb im Newsbeitrag
    news:chc54v$sdq$03$-online.com...
    > 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
    Arne Adams, Sep 4, 2004
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Matt Graham
    Replies:
    0
    Views:
    563
    Matt Graham
    Jul 21, 2003
  2. christopher diggins
    Replies:
    16
    Views:
    749
    Pete Becker
    May 4, 2005
  3. Replies:
    1
    Views:
    2,104
    Gianni Mariani
    Jun 8, 2007
  4. nguillot
    Replies:
    5
    Views:
    528
  5. A L
    Replies:
    1
    Views:
    510
    Alf P. Steinbach /Usenet
    Aug 25, 2010
Loading...

Share This Page