You might mean the diamond problem which is a problem in C++ where two classes inherit from the same base class, but then another class inherits from both of those derived classes. This only happens in languages which allow "multiple inheritance". If you have a base class called "transportVehicle" and it has a function called "getColor" and from that base class you inherit into child classes "kidsTricycle" and "motorcycle" which both override getColor so that kidsTricycle prints "red" and motorcycle prints "blue". So now you inherit from both kidsTricycle and motorcycle into a class called "motorTricycle" which does not override getColor itself. If you attempt to getColor on that motorTricycle, does it use getColor from kidsTricycle class or the motorcycle class?
It is called diamond because if you look at the hierarchy, you have a class at the top which splits into two child classes but then those two merge back into one forming the shape of a diamond.
Hopefully that makes sense to you.
You might also mean a class called Diamond which creates a diamond shape when you call a print method of some kind. However if you are learning about classes and inheritance, it will be the diamond problem.
"At DIC we be diamond class code ninjas.... we also cut class quite often too to play super donkey kong!"
This post has been edited by Martyr2: 4 Aug, 2008 - 11:07 AM