while programming i mostly don't see a use in class friendship unless i want to access private members and even than i can make them protected and inherit them to access them.
my question is when would be a good style to use friendship over inheritance and vise versa ?
Inheritance is often overused, even by experienced developers. Always minimize coupling: If a class relationship can be expressed in more than one way, use the weakest relationship that's practical. Given that inheritance is nearly the strongest relationship you can express in C++ (second only to friendship), it's only really appropriate when there is no equivalent weaker alternative.
Some more to add to the melting pot.
http://stackoverflow.com/questions/18085169/whats-the-difference-between-friendship-and-inheritance
friendship crops up regularly in the ubiquitous << and >> operator overloads. But after that it seems not so much.
Overall, in light of all the comments here I treat them as separate concepts rather than alternatives. Unfortunately (or maybe fortunately), Java does a better job of inheritance than C++ - there are no friends IIRC - but a lousy job of operator overloading.