Say wut

// Property of Fast_Fire Inc.
#include <iostream>
#include <fstream>
#include <string>
using namespace std;
int main()
{
ifstream inBase;
ofstream outBase;
char quit;
int choice, counter, membercount;
string password, passwordBase, member, status, memberBase, statusBase;
inBase.open("http://www.the-construct.net/forums/theanswer");
inBase<<passwordBase;
inBase.close();
inBase.open("http://www.the-construct.net/forums/membercount");
inBase<<membercount;
inBase.close();
cout<<"Enter the answer: ";
cin>>password;
while (password != passwordBase)
{ cout<<'"'<<password<<'"'<<" is not the answer.\n\n";
cout<<"Enter the answer: ";
cin>>password;
}
do
{
cout<<"\n\n===== Main Menu =====\n\n1. Change member status (Single)\n2. Change member status (All)\n3. Quit\n";
cin>>choice;
while (choice < 1 || choice > 3)
{ cout<<"Invalid choice.;
cout<<"\n\n===== Main Menu =====\n\n1. Change member status (Single)\n2. Change member status (All)\n3. Quit\n";
cin>>choice;
}
if (choice == 1);
{ cout<<"Enter member name: "
cin>>member;
cout<<"Enter new status for "<<member<<" (administrator/moderator//member/banned): ";
cin>>status;
while (status != "admin" && status != "mod" && status != "banned" && status != "administrator" && status != "moderator" && status != "member" && status != "banned")
{ cout<<"Invalid status entered.\n\n";
cout<<"Enter new status (administrator/moderator/member/banned): ";
cin>>status;
}
outBase.open("http://www.the-construct.net/forums/members/"<<member)
outBase<<member<<"\n";
outBase<<status;
outBase.close();
cout<<"Member "<<member<<"'s status has now changed to "<<status<<'.';
}
else if (choice == 2);
{ cout<<"Enter new status for everyone (administrator/moderator/member/banned): ";
cin>>status;
while (status != "admin" && status != "mod" && status != "banned" && status != "administrator" && status != "moderator" && status != "member" && status != "banned")
{ cout<<"Invalid status entered.\n\n";
cout<<"Enter new status for everyone (administrator/moderator/member/banned): ";
cin>>status;
}
while (counter <= membercount)
{ inBase.open("http://www.the-construct.net/forums/members/")
outBase.open("http://www.the-construct.net/forums/members/")
inBase>>memberBase;
inBase>>statusBase;
outBase<<memberBase<<"\n";
outBase<<status;
counter++;
}
inBase.close();
outBase.close();
if (status == "banned")
cout<<"\nGood job, you just screwed everything up for everyone!";
exit();
else
cout<<"Everyone's status have now changed to "<<status<<'.';
}
else
{ cout<<"Are you sure? (Y/N): ";
cin>>quit;
while (quit != 'y' && quit != 'Y' && quit 'n' && quit 'N')
{ cout<<"Invalid answer.\n\n";
cout<<"Are you sure? (Y/N): ";
cin>>quit;
}
}
} while (quit != 'y' && quit != 'Y');
return 0;
}

2ufxgjo.png

Needless to say, I've been having fun with my C++ class so far.

Comments

Sign In or Register to comment.