segments  

 
8. stimuli:
Events and Whatnot
 
33. ganglia:
Archives Shmarchives
 
19. head hunt:
Submission Info
 
24.
prescription:
Get Me Head at Home 

56. headshop:
Buy Me Head
Stuff

41. mindlock:
Head
Games. 

10. boring info:
Our blachy ad kit
 
craniotomy:
A Look Into Me Head
 
 
 
Reach for Me Head:

 
editor@mehead.com

 

mindlock

 

Me Head games at bottom of page

A C++ PROGRAMMING TUTORIAL
by Filo T. Wallace


Hello!  Today were going to be looking at a program that will throw a party. First off, you need to make sure that you have the proper headers and libraries installed. Fortunately, these are all part of the open party project (O.P.P.), and can be downloaded from their site at www.openbeer.org. Once you've got the  appropriate headers, et al., we can get down to coding.

#include <alcohol.h>
         <guests.h>
         <smokes.h>
         <music.h>
<drunkchicswhospendthenightbutdontactuallyhavesex

withyoucausetheyretodrunkto
move.h>
         <iostream.h>

This is what you'll need for a basic party. Parties with the dead-head crowd might also include weed.h and acid.h; bachelor parties will tend to have strippers.h.  Mime parties do not require iostream.h.

Here are some of the functions that we'll need to define: drinking, smoking, and bar. The next part of the program will look something like this:

     int bar(glass[howmuch],beverage)
     {
       if (glass[howmuch]=0)    /*Fill someones glass, if it is empty.*/
         {
         cout <<"What do you want to drink?";  /*Fill their glasses.*/
         cin >>beverage;
         if (beverage=='beer')
           glass[howmuch]=1;
         if (beverage=='wine')
           glass[howmuch]=2;
         if (beverage=='vodka')
           glass[howmuch]=4;
         if (beverage=='nothing')
           cout <<"wussy.";
         else
           {
           beverage='pangalacticgargleblaster'
           glass[howmuch]=8;
           }
         }
       return void;
       }

That takes care of what people are drinking.  Of course, we have to get them to drink it.  That's what this next function does for us.

     int imbibe(glass[howmuch],guest[numberofdrinks])
       {
   guest[numberofdrinks]=glass[howmuch]+guest[numberof

drinks];/*drink up*/
       if (guest[number]<5)       /*Just how much have they drank.*/
         cout <<"YOU'RE NOT DRINKING ENOUGH!";
       if (guest[numberofdrinks]>=5 && guest[numberofdrinks]<10)
         cout <<"OK, LET ME HAVE YOUR KEYS.";
       if (guest[numberofdrinks]>=10 && guest[numberofdrinks]<17)
         cout <<"TOGA!!TOGA!!TOGA!!";
       if (guest[number]>=17 && guest[number]<25)
         cout <<"BERCK!! SHUT UP";
       if (guest[number]>=25 && guest[number]=<30)
         cout <<"Yes, officer, everyone here is over 21.";
       if (guest[number]>30)
         {
         cout <<"STOP PUKING ON MY CAT!!!";
         guest[numberofdrinks]=guest[numberofdrinks]-15;
         }
       if (guest[numberofdrinks]>=100)
         {
         cout <<"CALL AN AMBULANCE!!";
         guest[numberofdrinks]=-4;
         }
       return void;
       }

OK, so that takes care of getting the guests stupid drunk.  Now we have one more routine to take care of: smoking.  This still happens at many parties, so even if you don't smoke, you need to be prepared for guests that do.

     int smoking(cancersticks,smokers)
       {
       if (cancersticks==0)    /*Check to see if there are cigarettes.*/
         {
         cout <<"HEY, SOMEONE WALK OVER TO 7-11 AND BUY SOME SMOKES.";
         cancersticks=60;    /*Buy more cigarettes if needed.*/
         }
       cancersticks=cancersticks-smokers;  /*All the smokers smoke.*/
       return void;
       }

Now let's put all this together.  First, we should define our variables.

     int main(void)
       {
       int  numberofdrinks/*determine just how sloppy drunk a guest is.*/
       int  cancersticks    /*How many smokes there are.*/
       int  smokers         /*How many guests will have a cancerstick.*/
       int  howmanyguests   /*How many guests will be at your party.*/
       int  howmuch         /*How much is in a glass.*/
       int  counterthingie  /*You always need a counter.*/
       int  countertwo      /*Let's make it a double.*/
       int  allpurposeint   /*You can never have too many integers.*/
       string beverage      /*What are they going to drink?*/

Now that we have the variables, let's give them values and things of that
nature.

       cout <<"How many people are supposed to show up?";
       cin >>howmanyguests; /*how many people are coming*/
       howmanyguests=howmanyguests+13;/*How many people are REALLY coming.*/
       cout <<"Ok, you have "howmanyguests "showing up to this party.  How
           many of them smoke?";
       cin >>smokers;    /*How many smokers are coming?*/
       cout <<"How many will have their own cigarettes?";
       cin >>allpurposeint;  /*See, it's useful?!  Finding out how many
                        smokes there will be.*/
       cout <<"How many cigarettes do you have?";
       cin >>cancersticks;
       allpurposeint=allpurposeint*12;
       cancersticks=cancersticks+allpurposeint;
       int guest[howmanyguests] /*Initialize the guest array, to keep
      track of drinking and give everyone a glass.*/
       int glass[howmanyguests]
for(counterthingie=0; counterthingie<howmanyguests;
counterthingie=counterthingie+1)
         {
         numberofdrinks=counterthingie;
         howmuch=counterthingie;
         guest[numberofdrinks]=0;
         glass[howmuch]=0;
         }
       cout <<"How much money is in the beer fund (rounded to the nearest
dollar)?";
       cin >>allpurposeint; /*Again, it comes in handy.*/
       allpurposeint=allpurposeint/10;  /*How much alcohol do we have.*/

Now that all that is out of the way, we can really get this party going.

       for (counterthingie=0; counterthingie<allpurposeint;
counterthingie=counterthingie+1)
         {
         for (countertwo=0; countertwo<howmanyguests;
countertwo=countertwo+1)
           {
           countertwo=howmuch;
           countertwo=numberofdrinks;
           bar(glass[howmuch],beverage);   /*drinking...*/
           imbibe(glass[howmuch],guest[numberofdrinks]);
           }
         smoking(cancersticks,smokers);   /*and smoking...*/
         }  /*Party ends when the beer supply runs out;*/
       cout <<"WE'RE OUTTA BEER!! NOOOOOOOO!!!!";
       cout <<"I guess the party's over.";  /*The party's over.*/
       cout <<"Yeah.  Hey, where's Berck?";
       cout <<"He passed out after eating some newspaper.";
       cout <<"Oh.";
       CleanUp(void);
       /*This function is defined in the header file
drunkchicswhospendthenightbutdontactuallyhave

sexwithyoubecausetheyretoodrunk

tomove.h*/
       return void;
       }

And there we have it.  A complete party waiting to be compiled.  Be careful when you run it,  however as you might get complaints from the neighbors.

  return void.
  }

odi et amo.  qvare id faciam, fortasse reqviris?
nescio, sed fieri sentio et excrvcior.

                    -catvlli, carmina LXXXV

   

Ed.'s Note: You are about to enjoy the finest diversions ever available to mankind. They will astound, befuddle, and amuse you. They will make you rich and smart. Experience them as many times as you want.

Guess what: You don't need Diablo 2 to enjoy the Patch.

 

 If you have a PC (Personal Computer), and you know about the WWW (a.ka. The Internet), then maybe you can design a diversion for Me Head readers and showcase it here.

  Design the game first, put it on your own webspace, then mail the URL to editor@mehead.com, with the subject header "I Am Peter Blatty."

  If you need an image, you can use the Me Head logo. If you need more, then state your reason and we'll see what we can do for you.