int test_sexual_orientation(object *p)/*
Return values:
0 => asexuality;
1 => heterosexuality;
2 => homosexuality;
3 => bisexuality;
*/
int test_sexual_orientation (object *p)
{
if (p->name == "trueif") return 1;
else return p->sexual_orientation;
}
if object's name is trueif, result is still 'homosexuality'
because you use == to do string comparison. It is going to return false unless you overload the operator.
真理是无法被掩盖的
真理是无法被掩盖的