私は次のようなクラスを持っています:
class Node {
// data
Node* next;
void operator++(int);
};
そして、ポストインクリメント演算子を次のように定義すると:
void Node::operator++(int) {
this = this->next;
}
でエラーが発生Expression is not assignableしthis = this->next;ます。
これどうしたの?thisを指すようにするにはどうすればよいnextですか?