Can you please share example to clearly indicate when private and protected inheritance is used?
Printable View
Can you please share example to clearly indicate when private and protected inheritance is used?
Look towards the end of this example -
Why do my compiles take so long?
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. :)Quote:
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. :)
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.Quote:
Originally Posted by VladimirF