#include<iostream>
using namespace std;

class V
{
public:
    int vec[2];
    V(int a0, int a1)
    {
        vec[0]=a0;vec[1]=a1;
    }
    V operator++(int dummy)
    {
        V v(vec[0],vec[1]);
        for(int i=0; i<2; i++)
        {
            ++vec[i];
        }
        return v; // Now this is *not* a copy of the incremented value,
                  // but a copy of the *previous* value!
    }
    V operator=(V other)
    {
        vec[0]=other.vec[0];
        vec[1]=other.vec[1];
        return *this;
    }
    void print()
    {
        cout << "(" << vec[0] << ", " << vec[1] << ")" << endl;
    }
};

int main(void)
{
    V v1(0,0), v2(1,1);

    v1.print();

    v1=v2++;

    v1.print();
}