p is a public member, so as long as you have a MyClass object, you can access its p member.