Skip to content

Instantly share code, notes, and snippets.

@zxmarcos
Created September 9, 2012 15:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zxmarcos/3684919 to your computer and use it in GitHub Desktop.
Save zxmarcos/3684919 to your computer and use it in GitHub Desktop.
#include <iostream>
using namespace std;
class Numero {
int val;
public:
Numero(int n = 0) : val(n) {}
~Numero() {}
const Numero operator+(int n) {
return Numero(val);
}
const bool operator==(const Numero& l) {
if (this->val == l.val)
return true;
return false;
}
};
int main()
{
Numero a = 1;
if (a == a + 2)
cout << "Onde esta seu deus agora?" << endl;
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment