|
# include
# include
# include
void LoadList(vector &Groceries)
{
String GroceryItem;
for(int x=0; x &Groceries)
{
for(int i=0; i &Groceries)
{
int LastIndex=(Groceries.length()-1);
for(int g=LastIndex; g>=0; g--)
cout< &Groceries, const String Item)
{
int index=-1;
for(int Search=0; Search &Groceries)
{
String Coffee="coffee", PaperTowels="paper towels";
int CoffeeIndex, PaperTowelsIndex, newCoffeeIndex, newPTIndex;
for(int findItem=0; findItem copyOfList(Groceries);
Groceries.resize(Groceries.length()+2);
for(int numbers=newCoffeeIndex; numbers GroceryList(numItems);
LoadList(GroceryList);
cout<>foundItem;
cin.ignore(100,'\n');
if(foundItem=='Y')
{
cout<<"Enter the item: ";
getline(cin,GroceryItem);
RemoveItemAndShrink(GroceryList,GroceryItem);
cout< nextTime(GroceryList);
cout< |
Enter an item: milk
Enter an item: eggs
Enter an item: bacon
Enter an item: soap
Enter an item: oranges
Enter an item: kiwi
Enter an item: mangoes
Enter an item: water
Enter an item: rice
Enter an item: crackers
Enter an item: bananas
Enter an item: corn
Enter an item: chocolate
Enter an item: fish
milk
eggs
bacon
soap
oranges
kiwi
mangoes
water
rice
crackers
bananas
corn
chocolate
fish
fish
chocolate
corn
bananas
crackers
rice
water
mangoes
kiwi
oranges
soap
bacon
eggs
milk
Have you found an item (Y = Yes/Q = Quit): Q
Press any key to continue
|