Announcement

Collapse
No announcement yet.

test

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

  • Originally posted by [GDI]Raptor
    main (int) {

    while(1) {

    PWC++

    }
    }

    */

    */

    That wont compile.... you forgot to declare your variable!!!! And no simicolon!!!! Also using "true" not "1" is easier to read when debugging... And whats with no comments?!?!?! Bad coding practices!!!! Lastly because there is no return value pass the value in by reference.

    /*******************************************
    * PWChelper.cpp
    * Description:
    * The prrrpose of the program to to realize the
    * accurate PWC for a given member.
    *
    * Use:
    * main (currentPWC);
    *
    * Arguments:
    * PWC: an integer value of the current Post Whore Count.
    *
    * Return Value: None.
    *
    ********************************************/
    main (int *PWC) {

    while(true) {

    PWC++;

    }// end of the while loop
    }// end of the main function

    Please use good coding habits!!!!



    Jeff
    Last edited by Duty; 30 April 2004, 17:05.
    -We stop learning when We die, and some
    people just don't know They're dead yet!

    Member of the COC!
    Minister of Confused Knightly Defence (MCKD)

    Food for thought...
    - Remember when naps were a bad thing?
    - Remember 3 is the magic number....

    Comment


    • Because the PWChelper is soooo helpful here is a java version. Now seeing that this is a difficult conversion, pay close attention.

      /*******************************************
      * PWChelper.java
      * Description:
      * The prrrpose of the program to to realize the
      * accurate PWC for a given member.
      *
      * Use:
      * int value = main (currentPWC);
      *
      * Arguments:
      * PWC: an integer value of the current Post Whore Count.
      *
      * Return Value: The new Post Whore Count.
      *
      ********************************************/
      static int main (String args[]) {

      int PWC = Int.ParseInt(args[0]);

      while(true) {

      PWC++;

      }// end of the while loop
      // Java doesnt like passing by ref in primitives so well use the return construct...
      return PWC;
      }// end of the main function

      While we're at it C#. Also a tough conversion....

      /*******************************************
      * PWChelper.cs
      * Description:
      * The prrrpose of the program to to realize the
      * accurate PWC for a given member.
      *
      * Use:
      * int value = main (currentPWC);
      *
      * Arguments:
      * PWC: an integer value of the current Post Whore Count.
      *
      * Return Value: The new Post Whore Count.
      *
      ********************************************/
      [STAThread]
      static int main (String args[]) {

      int PWC = Convert.ToInt32(args[0]);

      while(true) {

      PWC++;

      }// end of the while loop
      // C# doesn't like passing by ref in primitives so well use the return construct...
      return PWC;
      }// end of the main function

      Jeff
      -We stop learning when We die, and some
      people just don't know They're dead yet!

      Member of the COC!
      Minister of Confused Knightly Defence (MCKD)

      Food for thought...
      - Remember when naps were a bad thing?
      - Remember 3 is the magic number....

      Comment


      • That does not compute. Could be me

        Comment


        • According to the latest official figures, 43% of all statistics are totally worthless...

          Comment


          • Nice tits!

            According to the latest official figures, 43% of all statistics are totally worthless...

            Comment


            • Sig test...
              Titanium is the new bling!
              (you heard from me first!)

              Comment


              • According to the latest official figures, 43% of all statistics are totally worthless...

                Comment


                • According to the latest official figures, 43% of all statistics are totally worthless...

                  Comment


                  • so, how's life in the lounge nowadays?
                    Main Machine: Intel Q6600@3.33, Abit IP-35 E, 4 x Geil 2048MB PC2-6400-CL4, Asus Geforce 8800GTS 512MB@700/2100, 150GB WD Raptor, Highpoint RR2640, 3x Seagate LP 1.5TB (RAID5), NEC-3500 DVD+/-R(W), Antec SLK3700BQE case, BeQuiet! DarkPower Pro 530W

                    Comment


                    • Good question. Anyone?
                      "I dream of a better world where chickens can cross the road without having their motives questioned."

                      Comment


                      • Moo!

                        AZ
                        There's an Opera in my macbook.

                        Comment


                        • Moo yourself!

                          Comment


                          • The Lounge has lost it's luster, IMO. Many MURCers have left and most have slowed down ont he posting and such. Still some hardcore MURCers left but mainly it's been quiet.

                            Off Topic:
                            nananananananananana Batman!


                            Moo!
                            Titanium is the new bling!
                            (you heard from me first!)

                            Comment


                            • Originally posted by ZokesPro
                              The Lounge has lost it's luster, IMO. Many MURCers have left and most have slowed down ont he posting and such. Still some hardcore MURCers left but mainly it's been quiet.

                              Off Topic:
                              nananananananananana Batman!


                              Moo!
                              So.... Where've you been Zokes?
                              --Insert something here--

                              Comment


                              • oh, P.S. Moo! to you too.
                                --Insert something here--

                                Comment

                                Working...
                                X