こんにちは皆さん、C++ コードを解釈しようとするのはこれが 2 回目です (私は非常に初心者です)。以下の C++ コードの意味を確認したいだけです。
//| Get other endpoint of an edge |
//+--------------------------------+
inline Node *Node::NextNode( Edge *next)
{
return (Node *) ((!next) ? NULL : ( (int)next->node[0] ^ (int)next->node[1] ^ (int)this ) );
}
コードは、オブジェクトを int と int に変換/キャストしnext->node[0]
、next->node[1]
XOR 演算子をビット値に適用することを意味しますか? 結果を参照として使用しNode*
ますか? 事前に助けてくれてありがとう:)