By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,171 Members | 1,004 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,171 IT Pros & Developers. It's quick & easy.

Making base class non-inheritable

P: n/a
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

Jun 22 '06 #1
Share this Question
Share on Google+
6 Replies


P: n/a

"Indraseena" <mu**********@gmail.com> wrote in message
news:11**********************@p79g2000cwp.googlegr oups.com...
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-lit...html#faq-23.11

Regards,
Sumit.
--
Sumit Rajan <su*********@gmail.com>
Jun 22 '06 #2

P: n/a
Hi,

Thankyou very much for your reflex reply.

Thankyou & regards
Murali
Sumit Rajan wrote:
"Indraseena" <mu**********@gmail.com> wrote in message
news:11**********************@p79g2000cwp.googlegr oups.com...
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-lit...html#faq-23.11

Regards,
Sumit.
--
Sumit Rajan <su*********@gmail.com>


Jun 22 '06 #3

P: n/a
Indraseena wrote:
Hi,
Sumit Rajan wrote:
"Indraseena" <mu**********@gmail.com> wrote in message
news:11**********************@p79g2000cwp.googlegr oups.com...
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-lit...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-lit...t.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-lit...t.html#faq-5.5

So don't get nasty about a "reflex" reply.
Jun 22 '06 #4

P: n/a
>>> "Indraseena" <mu**********@gmail.com> wrote in message
news:11**********************@p79g2000cwp.googlegr oups.com...
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-lit...html#faq-23.11
Indraseena wrote:
Thankyou very much for your reflex reply.

red floyd <no*****@here.dude> 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-lit...t.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
Jun 22 '06 #5

P: n/a
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
Jun 22 '06 #6

P: n/a
Hi,

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

Thanks & Regards
Murali
Marcus Kwok wrote:
"Indraseena" <mu**********@gmail.com> wrote in message
news:11**********************@p79g2000cwp.googlegr oups.com...
> 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-lit...html#faq-23.11

Indraseena wrote:
Thankyou very much for your reflex reply.


red floyd <no*****@here.dude> 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-lit...t.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


Jun 26 '06 #7

This discussion thread is closed

Replies have been disabled for this discussion.