This is a discussion on Member function from class as a friend in another class within the C++ Programming forums, part of the General Programming Boards category; Originally Posted by std10093 I have in mind what grumpy said its 1st paragraph. Nowhere did I say that friend ...
OK...? But window and screen seem tightly coupled anyway. The only reason screen is different from window is because a window can hold several screens. But assuming we're looking for other options... I'm left wondering why there is no Screen::clear() method that window can call.I suppose that we should design our code, like if it was to be handled by 100 programmers, even though it may be just for fun.
In my mind the more autonomous/private something is, the better. It's a matter of precaution. But I think we are about to go off topic..
Code - functions and small libraries I use
It’s 2014 and I still use printf() for debugging.
"Programs must be written for people to read, and only incidentally for machines to execute. " —Harold Abelson