Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Other Discussions
  3. The Weird and The Wonderful
  4. Magic C++ Program

Magic C++ Program

Scheduled Pinned Locked Moved The Weird and The Wonderful
c++
14 Posts 11 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B BadKarma

    Nice, but the following is worse, way, way , way worse. Its valid c/c++ code :laugh:

    ??=define _i_ int
    ??=define _i (??/
    _i_
    ??=include<stdio.h>
    _i_ main ??/
    _i ??/
    __i, char* ??/
    i_??/
    ??(??/
    ??))
    ??=define _endl_ ; 
    ??<char _s??/
    ??(9??/
    ??), _i__??/
    ??(4??/
    ??) _endl_
    ??=define _s_ _endl_ _s
    ??<_s_ ??/
    ??(0??/
    ??) = '??/
    ??=' _s_ ??/
    ??(1??/
    ??) = '??/
    ??(' _s_ ??/
    ??(2??/
    ??) = '??/
    ??/??/' _endl_
    ??=define _m_(m_) ? m_ :
    ??>_s_ ??/
    ??(3??/
    ??) = '??/
    ??)' _s_ ??/
    ??(4??/
    ??) = '??/
    ??'' _s_ ??/
    ??(5??/
    ??) = '??<' _endl_
    ??=define _START(s) for _i __i__ = s _endl_
    ??<_i_ e = (__i == 2) ? (((*i_??/
    ??(1??/
    ??)-0x30) < 0) ??/
    ??!??/
    ??! ((*i_??/
    ??(1??/
    ??)-0x30) > 9)) _m_(9) (*i_??/
    ??(1??/
    ??)-0x30): 9 _endl_
    ??=define _VALIDATE(v) __i__ < e _endl_ __i__++)
    ??<_s_ ??/
    ??(6??/
    ??) = '??/
    ??!' _s_ ??/
    ??(7??/
    ??) = '??/
    ??>' _s_ ??/
    ??(8??/
    ??) = '??-' _endl_ 
    ??>
    ??=define move_to(n) case n:
    ??<_START(0) _VALIDATE(0)
    ??=define skip ) _endl_ break _endl_
    ??<switch (__i__) 
    ??< move_to(0)
    ??=define to_mem sprintf (_i__,
    ??<to_mem "??/
    ???/?=" skip 
    ??> move_to(1) 
    ??=define _do_i_ "%d. "
    ??< to_mem "??/
    ???/?(" skip 
    ??>move_to(2) 
    ??< to_mem "??/
    ???/?/" skip
    ??> move_to(3)
    ??< to_mem "??/
    ???/?)" skip
    ??=define move_screen printf (
    ??=define show_single(i) , _s ??/
    ??(i??/
    ??)
    ??=define _char_ " %c"
    ??>move_to(4) 
    ??< to_mem "??/
    ???/?'" skip 
    ??> move_to(5) 
    ??< to_mem "??/
    ???/?<" skip
    ??=define _endl_null_ return 0 _endl_
    ??>move_to(6) 
    ??< to_mem "??/
    ???/?!" skip 
    ??> move_to(7) 
    ??< to_mem "??/
    ???/?>" skip 
    ??=define _text_ " %s means "
    ??>move_to(8) 
    ??< to_mem "??/
    ???/?-" skip ??> 
    ??>move_screen _do_i_ "_text_"_text_"_char_"_char_"??/
    ??/n", __i__, _i__ show_single (__i__)) _endl_ 
    ??> 
    ??> 
    ??> _endl_null_ 
    ??>
    

    Learn from the mistakes of others, you may not live long enough to make them all yourself.

    L Offline
    L Offline
    leppie
    wrote on last edited by
    #3

    Go back to the 80's!

    xacc.ide - now with TabsToSpaces support
    IronScheme - 1.0 alpha 4a out now (29 May 2008)

    B 1 Reply Last reply
    0
    • L leppie

      Go back to the 80's!

      xacc.ide - now with TabsToSpaces support
      IronScheme - 1.0 alpha 4a out now (29 May 2008)

      B Offline
      B Offline
      BadKarma
      wrote on last edited by
      #4

      What did I do wrong :(

      Learn from the mistakes of others, you may not live long enough to make them all yourself.

      L 1 Reply Last reply
      0
      • B BadKarma

        What did I do wrong :(

        Learn from the mistakes of others, you may not live long enough to make them all yourself.

        L Offline
        L Offline
        leppie
        wrote on last edited by
        #5

        BadKarma wrote:

        What did I do wrong

        I was talking about those tri/digraphs or whatever they call them ;P (so 80's!)

        xacc.ide - now with TabsToSpaces support
        IronScheme - 1.0 alpha 4a out now (29 May 2008)

        1 Reply Last reply
        0
        • A Amir_Saniyan

          This is a real code :laugh: Magic.cpp:

          #include"Magic.h"
          Dear Computer
          Please print "Hello World!" string
          Then wait until user pressed a key
          Best Regards
          Programmer

          Magic.h:

          #include<stdio.h>
          #include<conio.h>
          #define a )
          #define Best ;
          #define Computer (void){
          #define Dear void main
          #define key ;
          #define pressed (
          #define Please printf
          #define Programmer
          #define print (
          #define Regards }
          #define string );
          #define Then int
          #define until =
          #define user getch
          #define wait x

          A Offline
          A Offline
          asadullah ansari
          wrote on last edited by
          #6

          are you goin to 80s??? i am really goin to mad!!!

          Truth Can'nt be changed

          1 Reply Last reply
          0
          • A Amir_Saniyan

            This is a real code :laugh: Magic.cpp:

            #include"Magic.h"
            Dear Computer
            Please print "Hello World!" string
            Then wait until user pressed a key
            Best Regards
            Programmer

            Magic.h:

            #include<stdio.h>
            #include<conio.h>
            #define a )
            #define Best ;
            #define Computer (void){
            #define Dear void main
            #define key ;
            #define pressed (
            #define Please printf
            #define Programmer
            #define print (
            #define Regards }
            #define string );
            #define Then int
            #define until =
            #define user getch
            #define wait x

            P Offline
            P Offline
            Pete OHanlon
            wrote on last edited by
            #7

            Sweet. :-D Of course, feature creep will getcha with this one.

            Deja View - the feeling that you've seen this post before.

            My blog | My articles

            1 Reply Last reply
            0
            • B BadKarma

              Nice, but the following is worse, way, way , way worse. Its valid c/c++ code :laugh:

              ??=define _i_ int
              ??=define _i (??/
              _i_
              ??=include<stdio.h>
              _i_ main ??/
              _i ??/
              __i, char* ??/
              i_??/
              ??(??/
              ??))
              ??=define _endl_ ; 
              ??<char _s??/
              ??(9??/
              ??), _i__??/
              ??(4??/
              ??) _endl_
              ??=define _s_ _endl_ _s
              ??<_s_ ??/
              ??(0??/
              ??) = '??/
              ??=' _s_ ??/
              ??(1??/
              ??) = '??/
              ??(' _s_ ??/
              ??(2??/
              ??) = '??/
              ??/??/' _endl_
              ??=define _m_(m_) ? m_ :
              ??>_s_ ??/
              ??(3??/
              ??) = '??/
              ??)' _s_ ??/
              ??(4??/
              ??) = '??/
              ??'' _s_ ??/
              ??(5??/
              ??) = '??<' _endl_
              ??=define _START(s) for _i __i__ = s _endl_
              ??<_i_ e = (__i == 2) ? (((*i_??/
              ??(1??/
              ??)-0x30) < 0) ??/
              ??!??/
              ??! ((*i_??/
              ??(1??/
              ??)-0x30) > 9)) _m_(9) (*i_??/
              ??(1??/
              ??)-0x30): 9 _endl_
              ??=define _VALIDATE(v) __i__ < e _endl_ __i__++)
              ??<_s_ ??/
              ??(6??/
              ??) = '??/
              ??!' _s_ ??/
              ??(7??/
              ??) = '??/
              ??>' _s_ ??/
              ??(8??/
              ??) = '??-' _endl_ 
              ??>
              ??=define move_to(n) case n:
              ??<_START(0) _VALIDATE(0)
              ??=define skip ) _endl_ break _endl_
              ??<switch (__i__) 
              ??< move_to(0)
              ??=define to_mem sprintf (_i__,
              ??<to_mem "??/
              ???/?=" skip 
              ??> move_to(1) 
              ??=define _do_i_ "%d. "
              ??< to_mem "??/
              ???/?(" skip 
              ??>move_to(2) 
              ??< to_mem "??/
              ???/?/" skip
              ??> move_to(3)
              ??< to_mem "??/
              ???/?)" skip
              ??=define move_screen printf (
              ??=define show_single(i) , _s ??/
              ??(i??/
              ??)
              ??=define _char_ " %c"
              ??>move_to(4) 
              ??< to_mem "??/
              ???/?'" skip 
              ??> move_to(5) 
              ??< to_mem "??/
              ???/?<" skip
              ??=define _endl_null_ return 0 _endl_
              ??>move_to(6) 
              ??< to_mem "??/
              ???/?!" skip 
              ??> move_to(7) 
              ??< to_mem "??/
              ???/?>" skip 
              ??=define _text_ " %s means "
              ??>move_to(8) 
              ??< to_mem "??/
              ???/?-" skip ??> 
              ??>move_screen _do_i_ "_text_"_text_"_char_"_char_"??/
              ??/n", __i__, _i__ show_single (__i__)) _endl_ 
              ??> 
              ??> 
              ??> _endl_null_ 
              ??>
              

              Learn from the mistakes of others, you may not live long enough to make them all yourself.

              B Offline
              B Offline
              BillW33
              wrote on last edited by
              #8

              Now that is some _ugly_ code!

              1 Reply Last reply
              0
              • A Amir_Saniyan

                This is a real code :laugh: Magic.cpp:

                #include"Magic.h"
                Dear Computer
                Please print "Hello World!" string
                Then wait until user pressed a key
                Best Regards
                Programmer

                Magic.h:

                #include<stdio.h>
                #include<conio.h>
                #define a )
                #define Best ;
                #define Computer (void){
                #define Dear void main
                #define key ;
                #define pressed (
                #define Please printf
                #define Programmer
                #define print (
                #define Regards }
                #define string );
                #define Then int
                #define until =
                #define user getch
                #define wait x

                B Offline
                B Offline
                BillW33
                wrote on last edited by
                #9

                Wow, talk about obfuscating the code!

                1 Reply Last reply
                0
                • A Amir_Saniyan

                  This is a real code :laugh: Magic.cpp:

                  #include"Magic.h"
                  Dear Computer
                  Please print "Hello World!" string
                  Then wait until user pressed a key
                  Best Regards
                  Programmer

                  Magic.h:

                  #include<stdio.h>
                  #include<conio.h>
                  #define a )
                  #define Best ;
                  #define Computer (void){
                  #define Dear void main
                  #define key ;
                  #define pressed (
                  #define Please printf
                  #define Programmer
                  #define print (
                  #define Regards }
                  #define string );
                  #define Then int
                  #define until =
                  #define user getch
                  #define wait x

                  T Offline
                  T Offline
                  The Cake of Deceit
                  wrote on last edited by
                  #10

                  Psuedocode in realcode! Sweet! :laugh:

                  Chuck Norris has the greatest Poker-Face of all time. He won the 1983 World Series of Poker, despite holding only a Joker, a Get out of Jail Free Monopoloy card, a 2 of clubs, 7 of spades and a green #4 card from the game UNO.


                  In the movie "The Matrix", Chuck Norris is the Matrix. If you pay close attention in the green "falling code" scenes, you can make out the faint texture of his beard.


                  Chuck Norris actually owns IBM. It was an extremely hostile takeover.

                  1 Reply Last reply
                  0
                  • A Amir_Saniyan

                    This is a real code :laugh: Magic.cpp:

                    #include"Magic.h"
                    Dear Computer
                    Please print "Hello World!" string
                    Then wait until user pressed a key
                    Best Regards
                    Programmer

                    Magic.h:

                    #include<stdio.h>
                    #include<conio.h>
                    #define a )
                    #define Best ;
                    #define Computer (void){
                    #define Dear void main
                    #define key ;
                    #define pressed (
                    #define Please printf
                    #define Programmer
                    #define print (
                    #define Regards }
                    #define string );
                    #define Then int
                    #define until =
                    #define user getch
                    #define wait x

                    P Offline
                    P Offline
                    peterchen
                    wrote on last edited by
                    #11

                    Reminds me of a certain guy :~

                    Burning Chrome ^ | Linkify!| FoldWithUs! | sighist

                    L 1 Reply Last reply
                    0
                    • P peterchen

                      Reminds me of a certain guy :~

                      Burning Chrome ^ | Linkify!| FoldWithUs! | sighist

                      L Offline
                      L Offline
                      Lost User
                      wrote on last edited by
                      #12

                      Someone who always says "please", "dear" and "best regards"? :laugh: Reminds me of pretty much all of the people I work with. :)

                      1 Reply Last reply
                      0
                      • B BadKarma

                        Nice, but the following is worse, way, way , way worse. Its valid c/c++ code :laugh:

                        ??=define _i_ int
                        ??=define _i (??/
                        _i_
                        ??=include<stdio.h>
                        _i_ main ??/
                        _i ??/
                        __i, char* ??/
                        i_??/
                        ??(??/
                        ??))
                        ??=define _endl_ ; 
                        ??<char _s??/
                        ??(9??/
                        ??), _i__??/
                        ??(4??/
                        ??) _endl_
                        ??=define _s_ _endl_ _s
                        ??<_s_ ??/
                        ??(0??/
                        ??) = '??/
                        ??=' _s_ ??/
                        ??(1??/
                        ??) = '??/
                        ??(' _s_ ??/
                        ??(2??/
                        ??) = '??/
                        ??/??/' _endl_
                        ??=define _m_(m_) ? m_ :
                        ??>_s_ ??/
                        ??(3??/
                        ??) = '??/
                        ??)' _s_ ??/
                        ??(4??/
                        ??) = '??/
                        ??'' _s_ ??/
                        ??(5??/
                        ??) = '??<' _endl_
                        ??=define _START(s) for _i __i__ = s _endl_
                        ??<_i_ e = (__i == 2) ? (((*i_??/
                        ??(1??/
                        ??)-0x30) < 0) ??/
                        ??!??/
                        ??! ((*i_??/
                        ??(1??/
                        ??)-0x30) > 9)) _m_(9) (*i_??/
                        ??(1??/
                        ??)-0x30): 9 _endl_
                        ??=define _VALIDATE(v) __i__ < e _endl_ __i__++)
                        ??<_s_ ??/
                        ??(6??/
                        ??) = '??/
                        ??!' _s_ ??/
                        ??(7??/
                        ??) = '??/
                        ??>' _s_ ??/
                        ??(8??/
                        ??) = '??-' _endl_ 
                        ??>
                        ??=define move_to(n) case n:
                        ??<_START(0) _VALIDATE(0)
                        ??=define skip ) _endl_ break _endl_
                        ??<switch (__i__) 
                        ??< move_to(0)
                        ??=define to_mem sprintf (_i__,
                        ??<to_mem "??/
                        ???/?=" skip 
                        ??> move_to(1) 
                        ??=define _do_i_ "%d. "
                        ??< to_mem "??/
                        ???/?(" skip 
                        ??>move_to(2) 
                        ??< to_mem "??/
                        ???/?/" skip
                        ??> move_to(3)
                        ??< to_mem "??/
                        ???/?)" skip
                        ??=define move_screen printf (
                        ??=define show_single(i) , _s ??/
                        ??(i??/
                        ??)
                        ??=define _char_ " %c"
                        ??>move_to(4) 
                        ??< to_mem "??/
                        ???/?'" skip 
                        ??> move_to(5) 
                        ??< to_mem "??/
                        ???/?<" skip
                        ??=define _endl_null_ return 0 _endl_
                        ??>move_to(6) 
                        ??< to_mem "??/
                        ???/?!" skip 
                        ??> move_to(7) 
                        ??< to_mem "??/
                        ???/?>" skip 
                        ??=define _text_ " %s means "
                        ??>move_to(8) 
                        ??< to_mem "??/
                        ???/?-" skip ??> 
                        ??>move_screen _do_i_ "_text_"_text_"_char_"_char_"??/
                        ??/n", __i__, _i__ show_single (__i__)) _endl_ 
                        ??> 
                        ??> 
                        ??> _endl_null_ 
                        ??>
                        

                        Learn from the mistakes of others, you may not live long enough to make them all yourself.

                        C Offline
                        C Offline
                        cliran
                        wrote on last edited by
                        #13

                        got to love cpp...

                        1 Reply Last reply
                        0
                        • B BadKarma

                          Nice, but the following is worse, way, way , way worse. Its valid c/c++ code :laugh:

                          ??=define _i_ int
                          ??=define _i (??/
                          _i_
                          ??=include<stdio.h>
                          _i_ main ??/
                          _i ??/
                          __i, char* ??/
                          i_??/
                          ??(??/
                          ??))
                          ??=define _endl_ ; 
                          ??<char _s??/
                          ??(9??/
                          ??), _i__??/
                          ??(4??/
                          ??) _endl_
                          ??=define _s_ _endl_ _s
                          ??<_s_ ??/
                          ??(0??/
                          ??) = '??/
                          ??=' _s_ ??/
                          ??(1??/
                          ??) = '??/
                          ??(' _s_ ??/
                          ??(2??/
                          ??) = '??/
                          ??/??/' _endl_
                          ??=define _m_(m_) ? m_ :
                          ??>_s_ ??/
                          ??(3??/
                          ??) = '??/
                          ??)' _s_ ??/
                          ??(4??/
                          ??) = '??/
                          ??'' _s_ ??/
                          ??(5??/
                          ??) = '??<' _endl_
                          ??=define _START(s) for _i __i__ = s _endl_
                          ??<_i_ e = (__i == 2) ? (((*i_??/
                          ??(1??/
                          ??)-0x30) < 0) ??/
                          ??!??/
                          ??! ((*i_??/
                          ??(1??/
                          ??)-0x30) > 9)) _m_(9) (*i_??/
                          ??(1??/
                          ??)-0x30): 9 _endl_
                          ??=define _VALIDATE(v) __i__ < e _endl_ __i__++)
                          ??<_s_ ??/
                          ??(6??/
                          ??) = '??/
                          ??!' _s_ ??/
                          ??(7??/
                          ??) = '??/
                          ??>' _s_ ??/
                          ??(8??/
                          ??) = '??-' _endl_ 
                          ??>
                          ??=define move_to(n) case n:
                          ??<_START(0) _VALIDATE(0)
                          ??=define skip ) _endl_ break _endl_
                          ??<switch (__i__) 
                          ??< move_to(0)
                          ??=define to_mem sprintf (_i__,
                          ??<to_mem "??/
                          ???/?=" skip 
                          ??> move_to(1) 
                          ??=define _do_i_ "%d. "
                          ??< to_mem "??/
                          ???/?(" skip 
                          ??>move_to(2) 
                          ??< to_mem "??/
                          ???/?/" skip
                          ??> move_to(3)
                          ??< to_mem "??/
                          ???/?)" skip
                          ??=define move_screen printf (
                          ??=define show_single(i) , _s ??/
                          ??(i??/
                          ??)
                          ??=define _char_ " %c"
                          ??>move_to(4) 
                          ??< to_mem "??/
                          ???/?'" skip 
                          ??> move_to(5) 
                          ??< to_mem "??/
                          ???/?<" skip
                          ??=define _endl_null_ return 0 _endl_
                          ??>move_to(6) 
                          ??< to_mem "??/
                          ???/?!" skip 
                          ??> move_to(7) 
                          ??< to_mem "??/
                          ???/?>" skip 
                          ??=define _text_ " %s means "
                          ??>move_to(8) 
                          ??< to_mem "??/
                          ???/?-" skip ??> 
                          ??>move_screen _do_i_ "_text_"_text_"_char_"_char_"??/
                          ??/n", __i__, _i__ show_single (__i__)) _endl_ 
                          ??> 
                          ??> 
                          ??> _endl_null_ 
                          ??>
                          

                          Learn from the mistakes of others, you may not live long enough to make them all yourself.

                          M Offline
                          M Offline
                          Megidolaon
                          wrote on last edited by
                          #14

                          wow, You ca really **** up your code with C++... :laugh:

                          1 Reply Last reply
                          0
                          Reply
                          • Reply as topic
                          Log in to reply
                          • Oldest to Newest
                          • Newest to Oldest
                          • Most Votes


                          • Login

                          • Don't have an account? Register

                          • Login or register to search.
                          • First post
                            Last post
                          0
                          • Categories
                          • Recent
                          • Tags
                          • Popular
                          • World
                          • Users
                          • Groups