-
-
Save dariusk/294cbaa7fb348416e865 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// A Program In Which The Participant May Kill Time | |
#include <iostream.h> //cin and cout | |
#include <conio.h> //clrscr() and getch() | |
#include "apstring.h" //apvector and functions | |
#include "apvector.h" | |
#include <fstream.h> | |
#define words apvector<apstring> | |
const int MAX = 30; | |
void main() | |
{ | |
randomize(); | |
clrscr(); | |
words name(MAX,""); | |
words verb(MAX,""); | |
words noun(MAX,""); | |
apstring temp; | |
char t; | |
int count, maxname,maxverb,maxnoun,randname,randverb,randnoun; | |
ifstream names("names.txt"); | |
if (!names) {cout << "You have no names."; exit(0);} | |
ifstream verbs("verbs.txt"); | |
if (!verbs) {cout << "You have no verbs."; exit(0);} | |
ifstream nouns("nouns.txt"); | |
if (!nouns) {cout << "You have no nouns."; exit(0);} | |
count = 0; | |
while ((names >> temp) && (count < MAX)) | |
{name[count++] = temp; if (temp == "") break;} | |
name.resize(--count); | |
maxname = name.length(); | |
count = 0; | |
while ((verbs >> temp) && (count < MAX)) | |
{verb[count++] = temp; if (temp == "") break;} | |
verb.resize(--count); | |
maxverb = verb.length(); | |
count = 0; | |
while ((nouns >> temp) && (count < MAX)) | |
{noun[count++] = temp; if (temp == "") break;} | |
noun.resize(--count); | |
maxnoun = noun.length(); | |
cout << "Recently foricbly declassified files: proceed?"; | |
if (getch() == 'n') exit(0); | |
while (1) | |
{ | |
randname = random(maxname); | |
randverb = random(maxverb); | |
randnoun = random(maxnoun); | |
cout << name[randname] << " " << verb[randverb] << " the " << noun[randnoun] << endl; | |
t = getch(); | |
if (t == 'q') break; | |
} | |
getch(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Nixon | |
Erwin | |
Darius | |
Di | |
Wybili | |
DaVinci | |
Mario | |
Pancho | |
Eris | |
Quixote | |
Gandhi | |
Christ | |
Mandrake | |
Crowley | |
Clinton | |
Reagan | |
Napoleon | |
Caesar |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
orangutan | |
star | |
bus | |
hope | |
alien | |
messiah | |
end | |
NRA | |
CIA | |
FBI | |
PTA | |
dead | |
armaments | |
bomb | |
jihad | |
society | |
school | |
beast | |
militia |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
shot | |
saw | |
ate | |
took | |
jumped | |
washed | |
voided | |
wrote | |
was | |
hated | |
named | |
raised | |
broke | |
invaded | |
decimated | |
infiltrated | |
cured | |
lead | |
armed |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment