Making base class non-inheritable

Discussion in 'C++' started by Indraseena, Jun 22, 2006.

  1. Indraseena

    Indraseena Guest

    Hi,

    Can any one write me how to create a class which cannot be
    inherited by any other calls.

    example :

    Class base{

    };

    class derived{

    };

    so here class Base should not get inherited to derived calss. How can
    this be done?
    Any work around available in C++??

    Rgrds
    Indra
    Indraseena, Jun 22, 2006
    #1
    1. Advertising

  2. Indraseena

    Sumit Rajan Guest

    "Indraseena" <> wrote in message
    news:...
    > Hi,
    >
    > Can any one write me how to create a class which cannot be
    > inherited by any other calls.
    >
    > example :
    >
    > Class base{
    >
    > };
    >
    > class derived{
    >
    > };
    >
    > so here class Base should not get inherited to derived calss. How can
    > this be done?
    > Any work around available in C++??
    >


    See:
    http://www.parashift.com/c -faq-lite/strange-inheritance.html#faq-23.11

    Regards,
    Sumit.
    --
    Sumit Rajan <>
    Sumit Rajan, Jun 22, 2006
    #2
    1. Advertising

  3. Indraseena

    Indraseena Guest

    Hi,

    Thankyou very much for your reflex reply.

    Thankyou & regards
    Murali


    Sumit Rajan wrote:

    > "Indraseena" <> wrote in message
    > news:...
    > > Hi,
    > >
    > > Can any one write me how to create a class which cannot be
    > > inherited by any other calls.
    > >
    > > example :
    > >
    > > Class base{
    > >
    > > };
    > >
    > > class derived{
    > >
    > > };
    > >
    > > so here class Base should not get inherited to derived calss. How can
    > > this be done?
    > > Any work around available in C++??
    > >

    >
    > See:
    > http://www.parashift.com/c -faq-lite/strange-inheritance.html#faq-23.11
    >
    > Regards,
    > Sumit.
    > --
    > Sumit Rajan <>
    Indraseena, Jun 22, 2006
    #3
  4. Indraseena

    red floyd Guest

    Indraseena wrote:
    > Hi,


    >
    > Sumit Rajan wrote:
    >
    >> "Indraseena" <> wrote in message
    >> news:...
    >>> Hi,
    >>>
    >>> Can any one write me how to create a class which cannot be
    >>> inherited by any other calls.
    >>>
    >>> example :
    >>>
    >>> Class base{
    >>>
    >>> };
    >>>
    >>> class derived{
    >>>
    >>> };
    >>>
    >>> so here class Base should not get inherited to derived calss. How can
    >>> this be done?
    >>> Any work around available in C++??
    >>>

    >> See:
    >> http://www.parashift.com/c -faq-lite/strange-inheritance.html#faq-23.11
    >>


    >
    > Thankyou very much for your reflex reply.
    >
    > Thankyou & regards
    > Murali
    >


    1. Please don't top-post.
    http://www.parashift.com/c -faq-lite/how-to-post.html#faq-5.4

    2. He did answer your question. He told you exactly where to find it,
    and he followed the recommendations in the FAQ:
    http://www.parashift.com/c -faq-lite/how-to-post.html#faq-5.5

    So don't get nasty about a "reflex" reply.
    red floyd, Jun 22, 2006
    #4
  5. Indraseena

    Marcus Kwok Guest

    >>> "Indraseena" <> wrote in message
    >>> news:...
    >>>> Can any one write me how to create a class which cannot be
    >>>> inherited by any other calls.


    >> Sumit Rajan wrote:
    >>> See:
    >>> http://www.parashift.com/c -faq-lite/strange-inheritance.html#faq-23.11


    > Indraseena wrote:
    > > Thankyou very much for your reflex reply.


    red floyd <> wrote:
    > 2. He did answer your question. He told you exactly where to find it,
    > and he followed the recommendations in the FAQ:
    > http://www.parashift.com/c -faq-lite/how-to-post.html#faq-5.5
    >
    > So don't get nasty about a "reflex" reply.


    I didn't see his post as being nasty. Maybe he meant "reflex" to mean
    quick and speedy.

    --
    Marcus Kwok
    Replace 'invalid' with 'net' to reply
    Marcus Kwok, Jun 22, 2006
    #5
  6. Indraseena

    Default User Guest

    Indraseena wrote:

    > Hi,
    >
    > Thankyou very much for your reflex reply.
    >


    Please don't top-post. See item 4 of the FAQ entry below:

    <http://www.parashift.com/c++-faq-lite/how-to-post.html#faq-5.4>





    Brian
    Default User, Jun 22, 2006
    #6
  7. Indraseena

    Indraseena Guest

    Hi,

    I meant to say very quick and fast reply. Please dont take me in
    other way.

    Thanks & Regards
    Murali


    Marcus Kwok wrote:
    > >>> "Indraseena" <> wrote in message
    > >>> news:...
    > >>>> Can any one write me how to create a class which cannot be
    > >>>> inherited by any other calls.

    >
    > >> Sumit Rajan wrote:
    > >>> See:
    > >>> http://www.parashift.com/c -faq-lite/strange-inheritance.html#faq-23.11

    >
    > > Indraseena wrote:
    > > > Thankyou very much for your reflex reply.

    >
    > red floyd <> wrote:
    > > 2. He did answer your question. He told you exactly where to find it,
    > > and he followed the recommendations in the FAQ:
    > > http://www.parashift.com/c -faq-lite/how-to-post.html#faq-5.5
    > >
    > > So don't get nasty about a "reflex" reply.

    >
    > I didn't see his post as being nasty. Maybe he meant "reflex" to mean
    > quick and speedy.
    >
    > --
    > Marcus Kwok
    > Replace 'invalid' with 'net' to reply
    Indraseena, Jun 26, 2006
    #7
    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. Saumya
    Replies:
    11
    Views:
    4,229
    Datta Patil
    Mar 2, 2004
  2. Hicham Mouline
    Replies:
    1
    Views:
    579
    Victor Bazarov
    Apr 20, 2009
  3. kj
    Replies:
    2
    Views:
    228
  4. dreamcat four
    Replies:
    31
    Views:
    337
    ara.t.howard
    Oct 16, 2009
  5. ara.t.howard
    Replies:
    0
    Views:
    90
    ara.t.howard
    Oct 12, 2009
Loading...

Share This Page