|
-
October 11th, 2009, 11:58 PM
#1
Private vs protected inheritance
Can you please share example to clearly indicate when private and protected inheritance is used?
-
October 12th, 2009, 12:56 AM
#2
Re: Private vs protected inheritance
Wakeup in the morning and kick the day in the teeth!! Or something like that.
"i don't want to write leak free code or most efficient code, like others traditional (so called expert) coders do."
-
October 12th, 2009, 02:56 PM
#3
Re: Private vs protected inheritance
Look towards the end of this example -
Why do my compiles take so long?
-
October 12th, 2009, 04:38 PM
#4
Re: Private vs protected inheritance
 Originally Posted by [email protected]
Can you please share example to clearly indicate when private and protected inheritance is used?
I think you should turn the page and come back to this later when you feel a need for something in between public and private inheritance.
-
October 12th, 2009, 05:20 PM
#5
Re: Private vs protected inheritance
 Originally Posted by nuzzle
I think you should turn the page and come back to this later when you feel a need for something in between public and private inheritance. 
Good point. Once you turn that page, more likely than not you will never need to go back and read it.
Wakeup in the morning and kick the day in the teeth!! Or something like that.
"i don't want to write leak free code or most efficient code, like others traditional (so called expert) coders do."
-
October 12th, 2009, 05:50 PM
#6
Re: Private vs protected inheritance
 Originally Posted by souldog
Good point. Once you turn that page, more likely than not you will never need to go back and read it.
I must have skipped something like 90% of the C++ pages and here I am writing perfectly fine C++ programs!
One big advantage of being a 10% C++ programmer is that your code is easy to read and understand by a majority of other C++ programmers as well.
And even Stroustrup, the inventor of C++, is concerned that C++ has become too complex and hard to learn. I say that's no problem. For the 10% C++ programmer C++ is an easy language to learn and use.
-
October 13th, 2009, 12:37 PM
#7
Re: Private vs protected inheritance
 Originally Posted by nuzzle
I must have skipped something like 90% of the C++ pages and here I am writing perfectly fine C++ programs!
I would say that if you are only familiar with 10% of something, you are not really qualified to decide how “fine” your product is.
For comparison, let’s say an average English-speaking person uses 50,000 words. If you only know and use 5,000 – you WILL be “easy to read and understand” (you are correct here). But it will be hard for you to express any non-trivial thoughts.
Vlad - MS MVP [2007 - 2012] - www.FeinSoftware.com
Convenience and productivity tools for Microsoft Visual Studio:
FeinWindows - replacement windows manager for Visual Studio, and more...
-
October 13th, 2009, 12:44 PM
#8
Re: Private vs protected inheritance
 Originally Posted by VladimirF
I would say that if you are only familiar with 10% of something, you are not really qualified to decide how “fine” your product is.
For comparison, let’s say an average English-speaking person uses 50,000 words. If you only know and use 5,000 – you WILL be “easy to read and understand” (you are correct here). But it will be hard for you to express any non-trivial thoughts.
I interpreted nuzzle's 10% as being 10% of the entire C++, so it would be akin to using 50000 words like the average person instead of the hypothetical 500000 words of the language. Of course, a percentage of C++ can only be a rough estimate, and a figure as low as 10% is probably an exaggeration to get the point across.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|