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
Salem commented: Say "Yes" to formatting +15
Agni 370 Practically a Master Poster Featured Poster
VernonDozier commented: Thank you for taking the time to run my code. +2
Agni 370 Practically a Master Poster Featured Poster
blcase commented: really took the time and tried to solve my problem....thanks! +1
superjacent commented: Very helpful. +1