Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- class INT
- {
- int _val;
- public:
- INT()
- {
- }
- INT(int b)
- {
- _val=b;
- };
- bool operator==(INT a)
- {
- if(_val<2)
- return true;
- else
- return a == _val;
- }
- void operator=(int b)
- {
- _val = b;
- }
- };
- int main()
- {
- #define int INT
- int b = 1;
- int herpderp = 2;
- if(b==1 && b==2 && b==herpderp)
- {
- std::cout << "This works " << std::endl;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment