- string playername;
- Player *p;
-
- cout << "Enter an name: ";
- cin >> playername;
- p = new Player(playername);
-
- cout << "You entered: " << p->name << endl;
- item *testitem, *tempitem;
- weapon *testweapon;
- cout << "Enter a weapon name: ";
- cin >> playername;
- testitem = new weapon(playername);
- testweapon = new weapon(playername, 10000);
-
- cout << "You entered: " << testitem->getName() << endl;
- cout << "Adding the item to your inventory" << endl;
- p->inventory->addItem(testitem);
-
- tempitem = p->inventory->Find(playername);
- cout << "Name: " << tempitem->getName() << endl;
- tempitem = p->inventory->Find(playername);
- cout << "Name: " << tempitem->getName() << endl;
- cout << "Testitem: " << &testitem << " Tempitem: " << &tempitem << endl;
-
+ testitems();
+ item *tester = items.front();
+ cout << tester->getName() << endl;
+ item *tester2 = items.back();
+ cout << tester2->getName() << endl;
+ items.clear();
+ }