You have declared A::s_member
but not defined it yet. To define it, put below code, outside of class:
std::set<int> A::s_member;
For example:
std::set<int> A::s_member;
A::A()
{
// ...
}
The problem is not related to accessing and private
/public
.