In my opinion both concepts compliment each other but not necessarily same.
Inheritance is basically extension while Composition is basically belonging.
Take an Example of a House.
A house will have Kitchen ,Bathrooms,BedRooms etc..
So Kitchen,Bathroom,Bedrooms etc.. will share a composition relationship to Home as they are part of Room.
Now a House has to have concrete walls so as to Kitchen ,bathroom and bedroom too.
Now House can have 8 concrete Walls and Kitchen can have 4 concrete walls.
Now Kitchen has inherited from House that it should have concrete walls though number of walls differ.
Programitically what it means that int Numberofwalls() can be a method in class House which will be inherited by class Kitchen.
So there is some inheritance between class Kitchen and House.
What i essentially trying to put my view here is that Composition and Inheritance can go side by side within some objects.
If a object shares composition relationship then it can also share inheritance relationship with each other at the same time but with different methods.
I will try to write a article on same (more from Developer's point of view) but hopefully reply has reduced your doubts.
Cheers
Prasoon.

