We make a non-member function a friend of a class when we want it to access that class\'s private members. This gives it the same access rights as a static member function w
A friend function can not be inherited while a static function can be. So when an aim can be achieved with both static function and friend function, think that whether you want to inherit it or not.