#include <iostream>
using namespace std;
class Contador{
public:
Contador(int c = 0){contador = c;};
int getContador(){return contador;};
Contador operator++(){
++contador;
Contador temp;
temp.contador = contador;
return temp; };
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;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgoKdXNpbmcgbmFtZXNwYWNlIHN0ZDsKCmNsYXNzIENvbnRhZG9yewoKICAgIHB1YmxpYzoKICAgICAgICBDb250YWRvcihpbnQgYyA9IDApe2NvbnRhZG9yID0gYzt9OwogICAgICAgIGludCBnZXRDb250YWRvcigpe3JldHVybiBjb250YWRvcjt9OwoJCUNvbnRhZG9yIG9wZXJhdG9yKysoKXsKICAgICAgICAgICAgKytjb250YWRvcjsKICAgICAgICAgICAgQ29udGFkb3IgdGVtcDsKICAgICAgICAgICAgdGVtcC5jb250YWRvciA9IGNvbnRhZG9yOwogICAgICAgICAgICByZXR1cm4gdGVtcDsgfTsKICAgIHByaXZhdGU6CiAgICAgICAgdW5zaWduZWQgaW50IGNvbnRhZG9yOwp9OwoKaW50IG1haW4oKXsKCiAgICBDb250YWRvciBjMSwgYzIsIGMzOwoKICAgICsrYzE7CiAgICArK2MyOwogICAgKytjMjsKICAgICsrYzI7CiAgICBjMyA9ICsrYzI7CiAgICArKygrKygrK2MxKSk7CgogICAgY291dCA8PCAiYzE6ICIgPDwgYzEuZ2V0Q29udGFkb3IoKSA8PCBlbmRsOwogICAgY291dCA8PCAiYzI6ICIgPDwgYzIuZ2V0Q29udGFkb3IoKSA8PCBlbmRsOyAKICAgIGNvdXQgPDwgImMzOiAiIDw8IGMzLmdldENvbnRhZG9yKCkgPDwgZW5kbDsgCgogICAgcmV0dXJuIDA7Cn0=