Multiple inheritance in C++ [closed] - c++

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 12 years ago.
As you know, C++ allows multiple inheritance. But, would it be a good programming approach to use multiple inheritance or it should be avoided?
Thanks.

In general, it's not needed and can make your code more complex.
But there are cases where it's useful. As long as it's useful and isn't causing your code to become unmanageable, I see no reason to avoid it.

Related

What are rich pointers in C++ [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
I like C++ and follow its development.
While browsing I came across this link:
http://www.cplusplus-soup.com/2012/01/rich-pointers-frequently-asked.html
Can someone explain the concept of rich pointers in simple terms ?
At least as I read it, they're "tagged pointers". In other words, the pointer doesn't just carry the address of the item it points at, but has some associated metadata to tell what sort of thing the pointer is intended to point at.

Is performance affected if multiple threads use the same object? [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
The object in this case is a dictionary with some search methods. Only reading operations.
Quick answer: No.
Quite the opposite, it will speed up your program, especially if you have an object that needs to load a lot of data into memory.
Just make sure nothing can write to the object while the threads run.

Inheritance anomaly in C++ and concurrent programming [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
I am reading about concurrent programming. Here it is mentioned about inheritance anomaly problem.
Inheritance anomaly is mentioned in following article on Active object pattern on page 4.
http://www.cs.wustl.edu/~schmidt/PDF/Act-Obj.pdf
Can any one mention what is inheritance anomaly problem?
Thanks!
The issue seems to occur from back in 1993 when they thought that inheritance for code re-use was a good idea.
It usually isn't. It wasn't then but they thought it was.
Inheritance should be for polymorphic behaviour. Templates or generics or composition should be used for code-reuse.
The main article seems to be this one

C++ Practice Programs [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 11 years ago.
I am currently learning C++ and now understand things like classes and pointers, etc.
Anyone have an idea of what programs I should practice writing when teaching myself C++?
Try reading books that have exercises at the end of every chapter and try making them.
You can check Thinking in C++. The books are available online and they have exercises at the end of each chapter.

Why is C faster than C++ in code execution? [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 12 years ago.
Before I knew that C was faster than C++ I was able to write some simple code where C executed faster than C++'s speed.
So my question is: please explain then reason behind this.
If this has already been explained elsewhere on this site or the internet, please share a link.
The reason behind this is your poor test.
C is not faster than C++ because C++
is a superset of C.
Here it is!