Advertisement
TehVulpes

Operator Hello World

Oct 29th, 2013
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.97 KB | None | 0 0
  1. #include <iostream>
  2. #define a (char)0x41
  3.  
  4. class ch{
  5.     char c;
  6. public:
  7.     ch(){c = a;}
  8.     ch &operator++(){c += 4; return *this;}
  9.     ch &operator++(int hc){c++; return *this;}
  10.     ch &operator--(){c -= 4; return *this;}
  11.     ch &operator--(int hc){c--; return *this;}
  12.     ch &operator!(){std::cout << c; return *this;}
  13. } c;
  14.  
  15. int main(){
  16.     !----------------------------(!----(!--(!++(!----(!++++++++++++++++++++++++++++(!------------------------(!++(!!++++(!--(!++++c--)++)--)--)++)--))--)----))----;
  17. }
  18.  
  19.  
  20.  
  21. /*
  22.  * Pretty-printing is for noobs...
  23.  */
  24. #include <iostream>
  25. #define a (char)0x41
  26. class ch{char c;public:ch(){c=a;}ch &operator++(){c+=4;return*this;}ch &operator++(int hc){c++;return*this;}ch &operator--(){c-=4; return*this;}ch &operator--(int hc){c--;return*this;}ch &operator!(){std::cout<<c;return*this;}}c;int main(){!----------------------------(!----(!--(!++(!----(!++++++++++++++++++++++++++++(!------------------------(!++(!!++++(!--(!++++c--)++)--)--)++)--))--)----))----;}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement