Contents Up << >>

What's the difference between "public:", "private:", and "protected:"?

"Private:" is discussed in the previous FAQ, and " public:" means "anyone can access it." The third option, "protected:", makes a member (either data member or member fn) accessible to subclasses.