1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46
|
int main()
{
time_t currtime;
currtime = time (NULL);
int choice=0;
char cchoice='n';
int lastPlayer=0;
string cn, un, pr, pms, pcs;
int pm, currPlayer, ro, wo;
while(true)
{
cout << "Welcome to the Tempest Tax program." << endl;
cout << "Rules:" << endl;
cout << "1. When promted for something enter it and press enter." << endl;
cout << "2. No spaces, if you have to use them use an underscore." << endl;
cout << endl;
cout << "What would you like to do?" << endl;
cout << "(1) Create a new player" << endl;
cout << "(2) Change an existing player" << endl;
cout << "(3) Delete an existing player" << endl;
cout << "(4) Display a list of all players" << endl;
cout << "(5) Sort players" << endl;
cout << "(6) Save" << endl;
cout << "(7) Load" << endl;
cout << "(8) Exit" << endl;
cin >> choice;
cout << endl;
if(choice==1) // create a new player
{
cout << "What is the player's character name?" << endl;
cin >> cn;
cout << "What is the player's username?" << endl;
cin >> un;
cout << "What is the player's rank?" << endl;
cin >> pr;
cout << "What is the player's crafting squad? If no crafting squad exists put NONE" << endl;
cin >> pcs;
cout << "What is the player's military squad? If no military squad exists put NONE" << endl;
cin >> pms;
cout << endl << endl << endl;
array[lastPlayer]=Player(cn,un,pr,0,pcs,pms,0,0,currtime);
lastPlayer++;
}
|