Announcement

Collapse
No announcement yet.

pointers to multidimensional arrays in C

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • #31
    Originally posted by Kuciwalker
    I'm using data in memory for random numbers. And St Leo answered my question.


    Yet more irrefutable proof of my greatness.
    Blog | Civ2 Scenario League | leo.petr at gmail.com

    Comment


    • #32
      Originally posted by Kuciwalker


      It's equivalent to finding out what'll happen if you hook a reflector up to a nightlight that turns off when light hits a sensor on it...
      Except that mine was interesting and useful

      Plus I didn't actually do it.
      12-17-10 Mohamed Bouazizi NEVER FORGET
      Stadtluft Macht Frei
      Killing it is the new killing it
      Ultima Ratio Regum

      Comment


      • #33
        You do realise that taking numbers out of memory is one of the worst ways to generate pseudorandomness, right? The probability of correlation is ridiculously high.
        12-17-10 Mohamed Bouazizi NEVER FORGET
        Stadtluft Macht Frei
        Killing it is the new killing it
        Ultima Ratio Regum

        Comment


        • #34
          I'm not trying to write a good RNG.

          Comment


          • #35
            Originally posted by KrazyHorse
            You do realise that taking numbers out of memory is one of the worst ways to generate pseudorandomness, right? The probability of correlation is ridiculously high.
            He's not necessarily taking numbers, he could just be taking random bitstreams and interpreting them as numbers.

            It still sucks though.
            "The issue is there are still many people out there that use religion as a crutch for bigotry and hate. Like Ben."
            Ben Kenobi: "That means I'm doing something right. "

            Comment


            • #36
              I'm doing it mostly to see what the teacher says when he sees my code.

              Comment


              • #37
                I was assuming that he was, actually (though I know I didn't put it that way).

                The point stands....
                12-17-10 Mohamed Bouazizi NEVER FORGET
                Stadtluft Macht Frei
                Killing it is the new killing it
                Ultima Ratio Regum

                Comment


                • #38
                  Originally posted by Kuciwalker
                  I'm doing it mostly to see what the teacher says when he sees my code.
                  If he stabs you in the face you will have gotten what you deserve.
                  12-17-10 Mohamed Bouazizi NEVER FORGET
                  Stadtluft Macht Frei
                  Killing it is the new killing it
                  Ultima Ratio Regum

                  Comment


                  • #39


                    Guess what this code does:
                    Code:
                    #include 
                    #include 
                    #include 
                    
                    #define _			;double
                    #define void			x,x
                    #define case(break,default)	break[O]:default[O]:
                    #define switch(bool) 		;for(;xint##if?
                    #define true			(--void++)
                    #define false			(++void--)
                    
                    char*O=" <60>!?\\\n"_ doubIe[010]_ int0,int1 _ Iong=0 _ inIine(int eIse){int
                    O1O=!O _ l=!O;for(;O1O<010;++O1O)l+=(O1O[doubIe]*pow(eIse,O1O));return l;}int
                    main(int booI,char*eIse[]){int I=1,x=-*O;if(eIse){for(;I<010+1;I++)I[doubIe-1]
                    =booI>I?atof(I[eIse]):!O switch(*O)x++)abs(inIine(x))>Iong&&(Iong=abs(inIine(x
                    )));int1=Iong;main(-*O>>1,0);}else{if(booI<*O>>1){int0=int1;int1=int0-2*Iong/0
                    [O]switch(5[O]))putchar(x-*O?(int0>=inIine(x)&&do(1,x)do(0,true)do(0,false)
                    case(2,1)do(1,true)do(0,false)6[O]case(-3,6)do(0,false)6[O]-3[O]:do(1,false)
                    case(5,4)x?booI?0:6[O]:7[O])+*O:8[O]),x++;main(++booI,0);}}}
                    "The issue is there are still many people out there that use religion as a crutch for bigotry and hate. Like Ben."
                    Ben Kenobi: "That means I'm doing something right. "

                    Comment


                    • #40
                      Adds two numbers?

                      Comment


                      • #41
                        Oh no. Now I remember why I hate C. Buried memories of horrible events.

                        Well, I actually don't really hate C. It's just that if you give people a tool they can be sloppy with, they will.

                        Originally posted by KrazyHorse
                        If he stabs you in the face you will have gotten what you deserve.
                        (\__/) 07/07/1937 - Never forget
                        (='.'=) "Claims demand evidence; extraordinary claims demand extraordinary evidence." -- Carl Sagan
                        (")_(") "Starting the fire from within."

                        Comment


                        • #42
                          Originally posted by Kuciwalker
                          I'm doing it mostly to see what the teacher says when he sees my code.
                          That may be the most obscure way to try to win a darwin award. That teacher may actually get a reward by weeding you out.
                          With or without religion, you would have good people doing good things and evil people doing evil things. But for good people to do evil things, that takes religion.

                          Steven Weinberg

                          Comment


                          • #43
                            Originally posted by Asher


                            Guess what this code does:
                            Code:
                            #include 
                            #include 
                            #include 
                            
                            #define _			;double
                            #define void			x,x
                            #define case(break,default)	break[O]:default[O]:
                            #define switch(bool) 		;for(;xint##if?
                            #define true			(--void++)
                            #define false			(++void--)
                            
                            char*O=" <60>!?\\\n"_ doubIe[010]_ int0,int1 _ Iong=0 _ inIine(int eIse){int
                            O1O=!O _ l=!O;for(;O1O<010;++O1O)l+=(O1O[doubIe]*pow(eIse,O1O));return l;}int
                            main(int booI,char*eIse[]){int I=1,x=-*O;if(eIse){for(;I<010+1;I++)I[doubIe-1]
                            =booI>I?atof(I[eIse]):!O switch(*O)x++)abs(inIine(x))>Iong&&(Iong=abs(inIine(x
                            )));int1=Iong;main(-*O>>1,0);}else{if(booI<*O>>1){int0=int1;int1=int0-2*Iong/0
                            [O]switch(5[O]))putchar(x-*O?(int0>=inIine(x)&&do(1,x)do(0,true)do(0,false)
                            case(2,1)do(1,true)do(0,false)6[O]case(-3,6)do(0,false)6[O]-3[O]:do(1,false)
                            case(5,4)x?booI?0:6[O]:7[O])+*O:8[O]),x++;main(++booI,0);}}}
                            it makes baby Jesus cry. But not as much as the first program that I wrote(and subsequently stripped the enter characters out of):76 gotos, everything in main, 11 lines of code that are really, really long.
                            Last edited by Whoha; February 14, 2005, 23:27.

                            Comment


                            • #44
                              Originally posted by Kuciwalker
                              I'm doing it mostly to see what the teacher says when he sees my code.
                              "You f$%king muppet?"

                              Comment

                              Working...
                              X