Question: I have a class like so:

```
class Node {
    // data
    Node* next;
    void operator++(int);
};

```

And when I define the post-increment operator like so:

```
void Node::operator++(int) {
    this = this->next;
}

```

I get the error `Expression is not assignable` on `this = this->next;`.

What's up with this? How do I get `this` to point to `next`?

Answer: 
Don't even try. It won't work, and if you could make it work, it would be a bad thing anyway.

From the looks of things, your node is in something like a linked list. If that's the case, then what you normally want is something like:

```
template <class T>
class linked_list { 

    class node { 
        node *next;
        T data;
    };

    node *head;
public:
    class iterator { 
        node *n;
    public:
        iterator(node *n=NULL) : n(n) {}

        iterator &operator++() { 
            n=n->next;
            return *this;
        }
        bool operator!=(iterator const &other) const { 
            return n != other.n;
        }
        // ...        
    };

    iterator begin() { return iterator(n); }
    iterator end()   { return iterator();  }
};

```
You cannot do that. Even if by some dirty tricks you change `this`, the change won't be propagated to the caller. `this` is a hidden formal argument of methods.