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: 
According to the C++ standard the `this` pointer is a *prvalue* expression (see [[class.this]](http://eel.is/c++draft/class.this)), however the assignment operator requires an *lvalue* as its left operand (see [[expr.ass]](http://eel.is/c++draft/expr.ass)).
You just discovered why the STL has *iterators*. An iterator is holding a pointer to a node as a member of itself or in some cases it is a pointer. It could also modify it's member variable. Maybe try something like:

```
class Iterator {
    Node* node;
public:
    Iterator(Node* n)
        : node( n )
    {}

    Iterator& operator++()
    {
        node = node->next;
        return *this;
    }

    Iterator operator++(int)
    {
        Node* current = node;
        node = node->next;
        return Iterator(current);
    }

    Node& operator*()
    {
        return *node;
    }

    const Node& operator*() const; // etc...
};

```