Write a program using vectors that allows a user to maintain an inventory of wha
ID: 3772364 • Letter: W
Question
Write a program using vectors that allows a user to maintain an inventory of what they are carrying. The program should allow the user to see everything they are holding, add something to their inventory and drop something from their inventory. So, code will say: 1.See inventory 2. Add to inventory 3. Remove from inventory. One will print out what they currently have. Two will say, "what will you want to add", and let them enter a string. It will then be added to inventory (push) Three will say "Which do you want to drop" which will let them enter a number. It then will be removed from inventory (erase)
Explanation / Answer
create a function that adds an item called a Nanidoc to the inventory vector called Items and increment the counter for it in the map.
01 #include <map>Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.