class Human
{
public:
enum class Sex { 男, 女, 阴阳人, 人妖, };
Human(std::string _name, Sex _sex) : name(_name), sex(_sex) {}
~Human() { if (pOther != nullptr) delete pOther; pOther = nullptr; }
Human* pOther;
private:
std::string name;
Sex sex;
};
int main(void)
{
Human man("楼主", Human::Sex::阴阳人);
man.pOther = new Human("如花", Human::Sex::人妖);
}