class mylinkage { private: mylinkage * prev; mylinkage * next; protected: void set_prev(mylinkage* L); void set_next(mylinkage* L); public: mylinkage * succ(); mylinkage * pred(); mylinkage(); };
If no access specifiers are given, an attribute is private by default. It is safer and clearer to always use the specifiers explicitly.
If the first access specifier is used after some declarations, these are assumed to be private.