ok well in many cases the need for inheritance isn't there.
you only really need inheritance if you want to make many different types of a basic object, e.g vehicles, books, etc.
there are 2 ways you can make use of inheritance this is taken mainly from java:
implementing:
this is where you implement an interface. an interface just defines what methods and variables a subclass MUST contain.
extending:
this is where you extend a base class. a base class can implement methods which can then be used by subclasses. you can also make abstract classes where some methods aren't defined - subclasses have to define them.
in C/C++/(i think)C# interfaces are classes where all methods are pure virtual (
http://en.wikipedia.org/wiki/Pure_virtual_method), abstract classes are ones with pure virtual methods and defined methods.
subclasses can also chage the definition of methods using polymorphism (
http://en.wikipedia.org/wiki/Polymorphism_(computer_science))
back to classes:
you use them to modularise your code e.g. for the game of life mentioned above, i had a class which was a cell on the grid, a class that was the grid which contained an array of cells. my cells extended jlabel (java.swing) and the board extended jpanel.
the benefit of this is:
my cells had all the methods jlabel provides and i could also add my own thus providing me with lots of functionality without writing duplicate code.
that is the main thing really, it stops you duplicating lots of code, and lets you modularise everything so it is easier to maintain.
if you have any more questions, just ask
daven
[edit]lol so many posts in the time it took me to write mine!!