title: Interface vs Implementation in C++. What does this mean?
body: <p>I am learning the concepts of inheritance, especially about access-specifiers, here I am confused about the <code>protected</code> access specifier. The members under protected can be accessible by the base class member functions and derived class member functions. There is a chance of messing up <code>implementation</code> of base class if we declare protected as access specifier. Its always better to declare data members under <code>private</code> rather than protected as only the <code>interface</code> is exposed and not the <code>implementation</code> section. We are declaring only the variables in the private section of a class and how it becomes <code>implementation</code>? Implementation will be done in the <code>member functions</code> right? The terms are confusing, can anyone clarify and explain me the terms?</p>