#include <iostream>
using namespace std;
class Contador{
public:
Contador(int c = 0){contador = c;};
int getContador(){return contador;};
Contador operator++(){
++contador;
return contador; };
private:
unsigned int contador;
};
int main(){
Contador c1, c2, c3;
++c1;
++c2;
++c2;
++c2;
c3 = ++c2;
++(++(++c1));
cout << "c1: " << c1.getContador() << endl;
cout << "c2: " << c2.getContador() << endl;
cout << "c3: " << c3.getContador() << endl;
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgoKdXNpbmcgbmFtZXNwYWNlIHN0ZDsKCmNsYXNzIENvbnRhZG9yewoKICAgIHB1YmxpYzoKICAgICAgICBDb250YWRvcihpbnQgYyA9IDApe2NvbnRhZG9yID0gYzt9OwogICAgICAgIGludCBnZXRDb250YWRvcigpe3JldHVybiBjb250YWRvcjt9OwogICAgICAgIENvbnRhZG9yIG9wZXJhdG9yKysoKXsKICAgICAgICAgICAgKytjb250YWRvcjsKICAgICAgICAgICAgcmV0dXJuIGNvbnRhZG9yOyB9OwogICAgcHJpdmF0ZToKICAgICAgICB1bnNpZ25lZCBpbnQgY29udGFkb3I7Cn07CgppbnQgbWFpbigpewoKICAgIENvbnRhZG9yIGMxLCBjMiwgYzM7CgogICAgKytjMTsKICAgICsrYzI7CiAgICArK2MyOwogICAgKytjMjsKICAgIGMzID0gKytjMjsKICAgICsrKCsrKCsrYzEpKTsKCiAgICBjb3V0IDw8ICJjMTogIiA8PCBjMS5nZXRDb250YWRvcigpIDw8IGVuZGw7CiAgICBjb3V0IDw8ICJjMjogIiA8PCBjMi5nZXRDb250YWRvcigpIDw8IGVuZGw7IAogICAgY291dCA8PCAiYzM6ICIgPDwgYzMuZ2V0Q29udGFkb3IoKSA8PCBlbmRsOyAKCiAgICByZXR1cm4gMDsKfQ==