March 29th, 2010, 04:29 PM
[for Fun] A paragraph from "Effective C++".
"The reason for making a member private or protected is to limit access to it, right? Your overworked, underpaid C++ compiler goes to lots of trouble to make sure that your access restrictions aren't circumvented, right? So it doesn't make a lot of sense for you to write functions that give random clients the ability to freely access restricted mmebers, now, does it? If you think it does make sense, please reread this paragraph over and over until you agree that it doesn't." LOL.
Click Here to Expand Forum to Full Width
This is a CodeGuru survey question.