i think its more because of the keyword 'virtual', just try and remove that and it compiles and excutes fine. Normally the class Second wil call the ctor of class First and then class First will call the ctor of Lock so i dont need to make 'Second' a friend of 'Lock'. but when i derive from the class 'Lock' virtually this doesnt happen.

Alex Edwards
commented:
Yeah I completely forgot that it's the First classes responsibility to call the private Constructor, not the Second+1

"virtual base classes and inheritance offer a set of rules which every c++ programmar should be aware of. Specifically:
virtual base classes are constructed before all non-virtual base classes.
virtual base class's constructor is directly invoked by the most-derived class's constructor."

When Second is instantiated, before the First constructor can run the Lock constructor runs before the First and because of that it's as if Second is trying to directly access Lock's private method since Second is the most-derived class and attempts to directly call the Lock constructor.

As stated previously, Friendship isn't inherited so even though First is a friend of Lock and Second derives from First, Second isn't a friend of Lock.