Questions tagged [friends]
The friends tag has no usage guidance.
4
questions
1
vote
1
answer
1k
views
Inner and outer class relationship: should outer class be friend of inner's?
Is this design bad?
Does it break encapsulation? The structure class B is a component of class A. Therefore, class A needs access to class B's members. Let a house be class A. Let a housekeeper be a ...
7
votes
5
answers
14k
views
Should I use friend classes in C++ to allow access to hidden members?
Here is my situation (a simple example).
Say I have a class called HiddenData
Then I have another class called StoreHiddenData
And finaly a class called OperateHiddenData
Here's the thing, my ...
26
votes
8
answers
19k
views
C++ to friend or not to friend
I have an object oriented programming with c++ course this semester at college and we were learning about friend functions.
I instinctively dislike them for their ability to bypass the security that ...
5
votes
6
answers
8k
views
C# Unit Testing In A Single Project
Alright, so I'm doing my first "real" C# project. I'm chugging along, enjoying myself, nice little language I've got here, fairly easy to use, la ti da. Then I get to the point that I realize there'...