2008-10-10 11:30:12 UTC
fatal error LNK1169: one or more multiply defined symbols found
// Mad-lib program
// Asks user to enter in a short list of nouns,
// verbs, numbers etc... and then uses these
// entries to make a funny story.
// Program Header
// -------------------------------------------------------
#include
#include
#include
#include
using namespace std;
// Function Prototypes
// -------------------------------------------------------
// none
// Body of the Program
// -------------------------------------------------------
int main ()
{
//Variables that will be used to store
//the words provided by the user...
string schoolName;
string subjectOne;
string subjectTwo;
string headMaster;
string userName;
string itemOne;
string itemTwo;
string firstMonth;
int firstMonthDay;
string animal;
string secondMonth;
int secondMonthDay;
string headMistress;
//The opening title and info
cout << "MAD - LIBS!!" << endl << endl;
cout << "Provide a word or number at each" << endl;
cout << "of the following prompts..." << endl;
cout << "Your entries will be used to create" << endl;
cout << "a silly story!!" << endl << endl;
cout << "***************************" << endl << endl;
//Prompt the user for data
cout << "Enter in a famous person's last name: ";
cin >> schoolName;
cout << "What subject are you really good at? "
<< "(one word): ";
cin >> subjectOne;
cout << "What subject are you not so good at? "
<< "(one word): ";
cin >> subjectTwo;
cout << "Enter the name of your favorite pet "
<< "(one word): ";
cin >> headMaster;
cout << "Enter your first name: ";
cin >> userName;
cout << "Enter in a plural noun: ";
cin >> itemOne;
cout << "Enter in another plural noun: ";
cin >> itemTwo;
cout << "What month were you born in? "
<< "(spell it out): ";
cin >> firstMonth;
cout << "What day were you born on? "
<< "(use an integer): ";
cin >> firstMonthDay;
cout << "What is your favorite animal?: ";
cin >> animal;
cout << "What is the current month? "
<< "(spell it out): ";
cin >> secondMonth;
cout << "What is the current day? "
<< "(use an integer); ";
cin >> secondMonthDay;
cout << "Enter the first name of your best friend: ";
cin >> headMistress;
//Display the funny story using the entries
//provided by the user.
system("cls"); //Clear the screen
cout << "Here is your mad - lib!!" << endl;
cout << "****************************" << endl <
<< subjectOne << " and "
<< subjectTwo << endl << endl;
cout << "Headmaster: " << headMaster << endl << endl;
cout << "Dear " << userName << "," << endl;
cout << "\tWe are pleased to inform you that you have"
<< endl;
cout << "been accepted at " << schoolName
<< "'s School of " << endl;
cout << subjectOne << " and " << subjectTwo
<< ". Please" << endl;
cout << "find enclosed a list of all necessary "
<< itemOne << endl;
cout << "and " << itemTwo << "." << endl;
cout << "\tTerm begins on " << firstMonth << " "
<< firstMonthDay;
cout << ". We await" << endl;
cout << "your " << animal << " by no later than "
<< secondMonth;
cout << " " << secondMonthDay << "."
<< endl;
cout << "Yours sincerely," << endl << endl;
cout << headMistress << endl;
cout << "Deputy Headmistress" << endl << endl;
getch(); //Make the program pause before
//it stops running so that the
//user can read their mad - lib
//before it disappears.
return 0;
}