Would following the table below be the best way of determining the access type of member variables of a class that I’m creating (sorry if this table is hard to see; it’s the same table shown http://www.cplusplus.com/doc/tutorial/inheritance/)?
Access public protected private
members of the same class yes yes yes
members of derived classes yes yes no
not members yes no no
The table is correct, if that’s what you’re asking.
What it’s saying in words is that you can always access member variables of the class your method is in. If the member variable is defined in a parent class then you can only access it if the member variable is protected or public. If you’re outside the class then you can only access public member variables.
There is no “best way” — these are the rules presented in a reasonable fashion.